northseadl/norix-skills / agent-task-orchestration
agent-task-orchestration
VerifiedTask decomposition and multi-agent orchestration with retry, checkpoint recovery, and real-time monitoring. Mixed Codex/Claude Code engine. Parallel/sequential execution.
| File | Kind | Size |
|---|---|---|
| .gitignore | other | 14 B |
| SKILL.md | skill md | 13.6 KB |
| agents/openai.yaml | config | 281 B |
| evals/evals.json | config | 5.8 KB |
| examples/feature-task-spec.md | markdown | 3.4 KB |
| package.json | manifest | 540 B |
| references/codex-patterns.md | markdown | 4.7 KB |
| references/quality-gate.md | markdown | 2.5 KB |
| references/task-decomposition.md | markdown | 3.1 KB |
| references/trinity-protocol.md | markdown | 4.1 KB |
| scripts/dashboard.html | other | 36.5 KB |
| scripts/dispatch.mjs | script | 7.3 KB |
| scripts/lib/cli.mjs | script | 5.7 KB |
| scripts/lib/dag.mjs | script | 4.2 KB |
| scripts/lib/engines.mjs | script | 15.2 KB |
| scripts/lib/logger.mjs | script | 593 B |
| scripts/lib/manage.mjs | script | 5.7 KB |
| scripts/lib/preflight.mjs | script | 1.2 KB |
| scripts/lib/reporter.mjs | script | 5.4 KB |
| scripts/lib/retry.mjs | script | 2.3 KB |
| scripts/lib/server.mjs | script | 5.4 KB |
| scripts/lib/store.mjs | script | 8.8 KB |
scripts/lib/retry.mjs
View on GitHub// Retry strategy — exponential backoff with jitter for rate-limit resilience
/** @typedef {{ maxRetries: number, baseDelay: number, maxDelay: number, backoffFactor: number, jitter: number }} RetryConfig */
/** @type {RetryConfig} */
const DEFAULT_CONFIG = {
maxRetries: 3,
baseDelay: 5_000,
maxDelay: 120_000,
backoffFactor: 2,
jitter: 0.2,
};
// Error patterns that justify a retry (transient failures only)
const RETRYABLE_PATTERNS = [
/rate.?limit/i,
/429/,
/too many requests/i,
/timeout/i,
/ETIMEDOUT/,
/ECONNRESET/,
/ECONNREFUSED/,
/socket hang up/i,
/overloaded/i,
/503/,
/service.?unavailable/i,
/capacity/i,
];
/**
* Determine if an error is retryable based on known transient patterns.
* @param {Error|string} error
* @returns {boolean}
*/
export function isRetryable(error) {
const msg = typeof error === "string" ? error : error?.message || "";
return RETRYABLE_PATTERNS.some((re) => re.test(msg));
}
/**
* Calculate delay for the given retry attempt using exponential backoff + jitter.
* @param {number} attempt - zero-based attempt index
* @param {RetryConfig} [config]
* @returns {number} delay in ms
*/
export function getRetryDelay(attempt, config = DEFAULT_CONFIG) {
const base = config.baseDelay * Math.pow(config.backoffFactor, attempt);
const jitter = base * config.jitter * (Math.random() * 2 - 1);
return Math.min(Math.round(base + jitter), config.maxDelay);
}
/**
* Execute `fn` with automatic retry on retryable errors.
* @template T
* @param {() => Promise<T>} fn
* @param {{ config?: RetryConfig, onRetry?: (attempt: number, delay: number, error: Error) => void }} [opts]
* @returns {Promise<T>}
*/
export async function withRetry(fn, opts = {}) {
const config = { ...DEFAULT_CONFIG, ...opts.config };
let lastError;
for (let attempt = 0; attempt <= config.maxRetries; attempt++) {
try {
return await fn();
} catch (err) {
lastError = err;
if (attempt >= config.maxRetries || !isRetryable(err)) throw err;
const delay = getRetryDelay(attempt, config);
opts.onRetry?.(attempt + 1, delay, err);
await new Promise((r) => setTimeout(r, delay));
}
}
throw lastError;
}
export { DEFAULT_CONFIG as RETRY_CONFIG };
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 471k | Updated | Claude CodeCodex | Verified | Install |
| 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: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| 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 available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |