Skip to content

notque/vexjoy-agent / skills/meta/toolkit

toolkit

Verified

Toolkit management: create and evaluate skills and agents, manage routing tables, generate Claude.md.

FileKindSize
SKILL.mdskill md15.5 KB
agents/skill-creator/analyzer.mdmarkdown4.8 KB
agents/skill-creator/comparator.mdmarkdown4.7 KB
agents/skill-creator/grader.mdmarkdown3.9 KB
assets/skill-creator/eval_viewer.htmlother57.1 KB
references/agent-comparison.mdmarkdown11.5 KB
references/agent-comparison/benchmark-tasks.mdmarkdown6.8 KB
references/agent-comparison/do-creation-compliance-tasks.jsonconfig8.5 KB
references/agent-comparison/examples-and-errors.mdmarkdown1.0 KB
references/agent-comparison/grading-rubric.mdmarkdown4.3 KB
references/agent-comparison/methodology.mdmarkdown7.4 KB
references/agent-comparison/optimization-guide.mdmarkdown12.0 KB
references/agent-comparison/optimization-tasks.example.jsonconfig853 B
references/agent-comparison/optimize-phase.mdmarkdown9.3 KB
references/agent-comparison/read-only-ops-short-tasks.jsonconfig375 B
references/agent-comparison/report-template.mdmarkdown3.8 KB
references/agent-comparison/socratic-debugging-body-short-tasks.jsonconfig372 B
references/agent-comparison/socratic-debugging-trigger-tasks.jsonconfig2.8 KB
references/agent-creator.mdmarkdown10.9 KB
references/agent-creator/agent-design-patterns.mdmarkdown12.4 KB
references/agent-creator/agent-eval-design.mdmarkdown7.7 KB
references/agent-creator/agent-frontmatter-template.mdmarkdown9.3 KB
references/agent-evaluation.mdmarkdown10.6 KB
references/agent-evaluation/batch-evaluation.mdmarkdown1.6 KB
references/agent-evaluation/common-issues.mdmarkdown2.1 KB
references/agent-evaluation/report-templates.mdmarkdown2.2 KB
references/agent-evaluation/scoring-rubric.mdmarkdown2.4 KB
references/blind-ab-tests.mdmarkdown7.8 KB
references/generate-claudemd.mdmarkdown11.0 KB
references/generate-claudemd/CLAUDEMD_TEMPLATE.mdmarkdown4.1 KB
references/generate-claudemd/examples-and-errors.mdmarkdown7.4 KB
references/github-profile-rules.mdmarkdown7.5 KB
references/github-profile-rules/github-api-patterns.mdmarkdown8.2 KB
references/github-profile-rules/rule-categories.mdmarkdown4.8 KB
references/hook-development.mdmarkdown10.9 KB
references/hook-development/architecture.mdmarkdown3.7 KB
references/hook-development/code-examples.mdmarkdown9.4 KB
references/hook-development/preferred-patterns.mdmarkdown6.5 KB
references/hook-development/telemetry-database.mdmarkdown6.5 KB
references/routing-table-updater.mdmarkdown10.2 KB
references/routing-table-updater/batch-mode.mdmarkdown2.1 KB
references/routing-table-updater/conflict-resolution.mdmarkdown3.8 KB
references/routing-table-updater/error-handling.mdmarkdown1.9 KB
references/routing-table-updater/examples.mdmarkdown4.8 KB
references/routing-table-updater/extraction-patterns.mdmarkdown2.2 KB
references/routing-table-updater/routing-format.mdmarkdown3.6 KB
references/routing-table-updater/skill-examples.mdmarkdown2.7 KB
references/skill-composer.mdmarkdown9.1 KB
references/skill-composer/compatibility-matrix.mdmarkdown13.0 KB
references/skill-composer/composition-patterns.mdmarkdown4.9 KB
references/skill-composer/examples.mdmarkdown17.1 KB
references/skill-composer/skill-patterns.mdmarkdown12.5 KB
references/skill-creator.mdmarkdown28.9 KB
references/skill-creator/agent-template.mdmarkdown18.5 KB
references/skill-creator/artifact-schemas.mdmarkdown8.2 KB
references/skill-creator/bundled-components.mdmarkdown2.3 KB
references/skill-creator/complexity-tiers.mdmarkdown8.0 KB
references/skill-creator/domain-research-targets.mdmarkdown13.2 KB
references/skill-creator/enrichment-workflow.mdmarkdown9.9 KB
references/skill-creator/error-catalog.mdmarkdown9.9 KB
references/skill-creator/preferred-patterns.mdmarkdown11.7 KB
references/skill-creator/progressive-disclosure.mdmarkdown8.5 KB
references/skill-creator/skill-template.mdmarkdown14.6 KB
references/skill-creator/workflow-patterns.mdmarkdown7.6 KB
references/system-upgrade.mdmarkdown11.0 KB
references/system-upgrade/component-audit-checklists.mdmarkdown8.4 KB
references/system-upgrade/upgrade-failure-modes.mdmarkdown8.7 KB
references/system-upgrade/upgrade-signal-parsing.mdmarkdown7.3 KB
references/toolkit-evolution.mdmarkdown14.5 KB
references/toolkit-evolution/diagnose-scripts.mdmarkdown9.5 KB
references/toolkit-evolution/evolution-history.mdmarkdown5.5 KB
references/toolkit-evolution/evolution-report-template.mdmarkdown716 B
references/toolkit-evolution/evolve-preferred-patterns.mdmarkdown6.9 KB
references/toolkit-evolution/evolve-scripts.mdmarkdown3.7 KB
references/toolkit-governance.mdmarkdown16.0 KB
references/toolkit-governance/adr-lifecycle.mdmarkdown10.9 KB
references/toolkit-governance/frontmatter-compliance.mdmarkdown11.1 KB
references/toolkit-governance/hook-standardization.mdmarkdown21.5 KB
references/toolkit-governance/routing-table-patterns.mdmarkdown11.6 KB
references/weak-model-uplift.mdmarkdown10.3 KB
scripts/agent-comparison/compare.pyscript2.3 KB
scripts/agent-comparison/generate_variant.pyscript19.6 KB
scripts/agent-comparison/optimize_loop.pyscript89.3 KB
scripts/agent-comparison/trigger_eval.pyscript19.5 KB
scripts/routing-table-updater/extract_metadata.pyscript10.8 KB
scripts/routing-table-updater/generate_routes.pyscript10.5 KB
scripts/routing-table-updater/scan.pyscript4.7 KB
scripts/routing-table-updater/update_routing.pyscript12.4 KB
scripts/routing-table-updater/validate.pyscript7.3 KB
scripts/skill-composer/build_dag.pyscript12.5 KB
scripts/skill-composer/discover_skills.pyscript12.1 KB
scripts/skill-composer/validate.pyscript12.3 KB
scripts/skill-creator/aggregate_benchmark.pyscript10.0 KB
scripts/skill-creator/eval_compare.pyscript10.2 KB
scripts/skill-creator/optimize_description.pyscript12.5 KB
scripts/skill-creator/package_results.pyscript7.8 KB
scripts/skill-creator/run_eval.pyscript6.3 KB

scripts/routing-table-updater/generate_routes.py

View on GitHub
#!/usr/bin/env python3
"""
Generate routing table entries from extracted metadata.
Detects conflicts and applies priority rules.
"""

import argparse
import json
import sys
from pathlib import Path
from typing import Any, Dict, List


class GenerationError(Exception):
    """Custom exception for generation errors."""

    pass


def format_trigger_patterns(patterns: List[str]) -> str:
    """
    Format trigger patterns as quoted comma-separated list.

    Example: ["lint", "format"] → '"lint", "format"'
    """
    if not patterns:
        return '""'

    quoted_patterns = [f'"{p}"' for p in patterns]
    return ", ".join(quoted_patterns)


def generate_intent_detection_entry(capability: Dict[str, Any]) -> Dict[str, Any]:
    """
    Generate Intent Detection Patterns table entry.

    Table format:
    | User Says | Route To | Complexity | [AUTO-GENERATED] |
    """
    patterns = capability.get("trigger_patterns", [])
    if not patterns:
        raise GenerationError(
            f"No trigger patterns for skill {capability['name']}\n"
            f"Update description to include explicit trigger phrases"
        )

    name = capability["name"]
    complexity = capability["complexity"]

    # Determine route target format
    if "skill" in capability["type"]:
        route_to = f"{name} skill"
    else:
        route_to = f"{name} agent"

    entry = {
        "user_says": format_trigger_patterns(patterns),
        "route_to": route_to,
        "complexity": complexity,
        "auto_generated": True,
        "source_file": capability["file_path"],
        "pattern_list": patterns,  # For conflict detection
    }

    return entry


def generate_domain_specific_entry(capability: Dict[str, Any]) -> Dict[str, Any]:
    """
    Generate Domain-Specific Routing table entry.

    Table format:
    | Domain Mentioned | Agent | Typical Complexity | [AUTO-GENERATED] |
    """
    keywords = capability.get("domain_keywords", [])
    if not keywords:
        raise GenerationError(
            f"No domain keywords for agent {capability['name']}\nAgent description must include technology names"
        )

    name = capability["name"]
    complexity = capability["complexity"]

    entry = {
        "domain_mentioned": ", ".join(keywords),
        "agent": name,
        "typical_complexity": complexity,
        "auto_generated": True,
        "source_file": capability["file_path"],
        "keyword_list": keywords,  # For conflict detection
    }

    return entry


def generate_task_type_entry(capability: Dict[str, Any]) -> Dict[str, Any]:
    """
    Generate Task Type Routing table entry.

    Table format:
    | Task Type | Route To Agent | Complexity | [AUTO-GENERATED] |
    """
    # For agents without domain keywords
    name = capability["name"]
    complexity = capability["complexity"]

    # Extract task type from description
    description = capability["description"]

    # Use first sentence or clause as task type
    task_type = description.split(".")[0].strip()
    if len(task_type) > 100:
        task_type = task_type[:97] + "..."

    entry = {
        "task_type": f'"{task_type}"',
        "route_to": f"{name} agent",
        "complexity": complexity,
        "auto_generated": True,
        "source_file": capability["file_path"],
    }

    return entry


def detect_conflicts(entries: List[Dict[str, Any]], table_name: str) -> List[Dict[str, Any]]:
    """
    Detect routing conflicts within a table.

    Returns list of conflict descriptions.
    """
    conflicts = []

    if table_name == "Intent Detection Patterns":
        # Check for pattern overlaps
        pattern_map: Dict[str, List[str]] = {}

        for entry in entries:
            patterns = entry.get("pattern_list", [])
            route = entry["route_to"]

            for pattern in patterns:
                pattern_lower = pattern.lower()
                if pattern_lower not in pattern_map:
                    pattern_map[pattern_lower] = []
                pattern_map[pattern_lower].append(route)

        # Find patterns with multiple routes
        for pattern, routes in pattern_map.items():
            if len(routes) > 1 and len(set(routes)) > 1:  # Multiple different routes
                # Determine severity
                severity = "low"  # Default

                # High severity if routes are incompatible
                if "deploy" in pattern.lower():
                    severity = "high"
                elif any(word in pattern.lower() for word in ["create", "build", "setup"]):
                    severity = "medium"

                conflicts.append(
                    {
                        "pattern": pattern,
                        "routes": list(set(routes)),
                        "severity": severity,
                        "resolution": "More specific pattern takes precedence",
                    }
                )

    elif table_name == "Domain-Specific Routing":
        # Check for domain keyword overlaps
        keyword_map: Dict[str, List[str]] = {}

        for entry in entries:
            keywords = entry.get("keyword_list", [])
            agent = entry["agent"]

            for keyword in keywords:
                keyword_lower = keyword.lower()
                if keyword_lower not in keyword_map:
                    keyword_map[keyword_lower] = []
                keyword_map[keyword_lower].append(agent)

        # Find keywords with multiple agents
        for keyword, agents in keyword_map.items():
            if len(agents) > 1 and len(set(agents)) > 1:
                conflicts.append(
                    {
                        "keyword": keyword,
                        "agents": list(set(agents)),
                        "severity": "medium",
                        "resolution": "More specific domain context takes precedence",
                    }
                )

    return conflicts


def generate_routing_entries(capabilities: List[Dict[str, Any]]) -> Dict[str, Any]:
    """
    Generate all routing table entries from capabilities.

    Returns dict organized by routing table.
    """
    routing_entries = {
        "Intent Detection Patterns": [],
        "Task Type Routing": [],
        "Domain-Specific Routing": [],
        "Combination Routing": [],
    }

    all_conflicts = []

    for capability in capabilities:
        routing_table = capability["routing_table"]

        try:
            if routing_table == "Intent Detection Patterns":
                entry = generate_intent_detection_entry(capability)
                routing_entries[routing_table].append(entry)

            elif routing_table == "Domain-Specific Routing":
                entry = generate_domain_specific_entry(capability)
                routing_entries[routing_table].append(entry)

            elif routing_table == "Task Type Routing":
                entry = generate_task_type_entry(capability)
                routing_entries[routing_table].append(entry)

            # Combination routing handled separately (manual only for now)

        except GenerationError as e:
            print(f"WARNING: {e}", file=sys.stderr)
            continue

    # Detect conflicts in each table
    for table_name, entries in routing_entries.items():
        if entries:
            conflicts = detect_conflicts(entries, table_name)
            all_conflicts.extend(conflicts)

    # Sort entries alphabetically within each table
    for table_name in routing_entries:
        if table_name == "Intent Detection Patterns":
            # Sort by first pattern
            routing_entries[table_name].sort(key=lambda e: e.get("pattern_list", [""])[0].lower())
        elif table_name == "Domain-Specific Routing":
            # Sort by first keyword
            routing_entries[table_name].sort(key=lambda e: e.get("keyword_list", [""])[0].lower())
        elif table_name == "Task Type Routing":
            # Sort by task type
            routing_entries[table_name].sort(key=lambda e: e.get("task_type", "").lower())

    return routing_entries, all_conflicts


def main():
    """Main entry point."""
    parser = argparse.ArgumentParser(description="Generate routing table entries from metadata")
    parser.add_argument("--input", type=Path, required=True, help="Input JSON from extract_metadata.py")
    parser.add_argument("--output", type=Path, help="Output JSON file path (default: stdout)")
    parser.add_argument("--verbose", action="store_true", help="Enable verbose output to stderr")

    args = parser.parse_args()

    try:
        # Load metadata
        if not args.input.exists():
            raise GenerationError(f"Input file not found: {args.input}")

        with open(args.input, "r", encoding="utf-8") as f:
            metadata = json.load(f)

        if metadata.get("status") != "success":
            raise GenerationError(f"Input metadata has error status: {metadata.get('status')}")

        capabilities = metadata["capabilities"]

        if args.verbose:
            print(f"Generating routing entries for {len(capabilities)} capabilities", file=sys.stderr)

        # Generate routing entries
        routing_entries, conflicts = generate_routing_entries(capabilities)

        # Count total entries
        total_entries = sum(len(entries) for entries in routing_entries.values())

        # Build result
        result = {
            "status": "success",
            "entries_generated": total_entries,
            "conflicts_detected": len(conflicts),
            "routing_entries": routing_entries,
            "conflicts": conflicts,
        }

        if args.verbose:
            print(f"Generated {total_entries} routing entries", file=sys.stderr)
            if conflicts:
                print(f"Detected {len(conflicts)} routing conflicts", file=sys.stderr)

        # Output result
        output_json = json.dumps(result, indent=2, ensure_ascii=False)

        if args.output:
            args.output.parent.mkdir(parents=True, exist_ok=True)
            with open(args.output, "w", encoding="utf-8") as f:
                f.write(output_json)

            if args.verbose:
                print(f"Routing entries written to: {args.output}", file=sys.stderr)
        else:
            print(output_json)

    except GenerationError as e:
        print(
            json.dumps({"status": "error", "error_type": "GenerationError", "message": str(e)}, indent=2),
            file=sys.stderr,
        )
        sys.exit(1)

    except Exception as e:
        print(
            json.dumps({"status": "error", "error_type": type(e).__name__, "message": str(e)}, indent=2),
            file=sys.stderr,
        )
        sys.exit(2)


if __name__ == "__main__":
    main()
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall