plugin-architecture

Standardize axios-retryer plugin architecture with orchestrator, folders, and event-driven boundaries.

2|Updated Dec 18, 2024
One-click install
npx skills add https://github.com/sampleXbro/axios-retryer --skill plugin-architecture-samplexbro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: plugin-architecture
Source: https://github.com/sampleXbro/axios-retryer/tree/main/.junie/skills/plugin-architecture
Command: npx skills add https://github.com/sampleXbro/axios-retryer --skill plugin-architecture-samplexbro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a single, enforceable plugin architecture for axios-retryer to avoid ad hoc plugin shapes, hidden mutable state, and inconsistent public surfaces when creating, refactoring, or reviewing plugins.

Core Features & Use Cases

  • Opinionated folder layout: Defines the orchestrator, index, types, configs, errors, utils, managers/storage, and optional interceptors to keep responsibilities clear.
  • Behavioral and implementation rules: Prescribes use of PluginContext methods, event-driven boundaries, queue gating, metrics integration, and no any types.
  • Developer workflow guidance: Encourages reading the plugin contract, inspecting existing plugins, extracting helpers when files grow, and adding focused unit tests.
  • Use Cases: Bootstrapping a new plugin, refactoring a complex plugin into collaborators, and performing repository plugin architecture reviews.

Quick Start

Read src/types/plugins.ts, inspect an existing plugin, and scaffold YourPlugin following the referenced folder-structure guidance before writing orchestration logic.

Frequently Asked Questions about plugin-architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure an axios plugin to avoid hidden state and inconsistent exports?

Standardize axios plugin architecture by enforcing a top-level orchestrator alongside focused folders for types, configs, errors, and utils. This structure prevents hidden mutable state and ensures consistent public surfaces for plugin contract compliance.

What is the best way to refactor a complex axios-retryer plugin into manageable collaborators?

Refactor complex axios-retryer plugins by extracting helpers when files grow beyond test-first thresholds and organizing collaborators into dedicated managers, storage, and interceptors folders. This maintains clear orchestration boundaries and consistent exports.

Do I need TypeScript to enforce event-driven boundaries in my plugin architecture?

TypeScript is required to enforce strict plugin architecture, specifically by prohibiting any types and defining explicit event-driven boundaries. Using PluginContext methods and typed configurations prevents hidden state during axios plugin development.

What folders should I scaffold when bootstrapping a new axios plugin?

Scaffold an opinionated folder layout including an orchestrator, index, types, configs, errors, utils, and optional managers or storage. This separation keeps responsibilities clear before writing orchestration logic for your axios-retryer plugin.

Why does my plugin architecture review fail public contract compliance checks?

Plugin architecture reviews fail when implementations lack a top-level orchestrator, use hidden mutable state, or miss explicit event-driven boundaries. Enforcing focused folder structures and queue gating ensures compliance with the public plugin contract.

Can I use this plugin architecture guidance for reviewing existing codebases?

Yes, you can apply this architecture guidance to review existing repositories by inspecting plugin shapes, checking for consistent exports, and verifying test-first extraction thresholds. It helps identify ad hoc structures and hidden state during audits.