Agentic AI Atlasby a5c.ai
OverviewWikiGraphFor AgentsEdgesSearchWorkspace
/
GitHubDocsDiscord
i.2Wiki
Agentic AI Atlas · common-utilities (Library)
library/common-utilitiesa5c.ai
Search the atlas/
Wiki · linked records

Article and nearby pages

I.Current articlepp. 1 - 1
accessibility (Library)Aerospace Engineering Specialization (Library)AI Agents and Conversational AI Specialization (Library)Algorithms and Optimization Specialization (Library)Arts and Culture Specialization (Library)ATDD/TDD Methodology (Library)
II.Documented nodesrefs · 1
Common Utilities · Specialization
I.
Wiki article

library/common-utilities

Reading · 6 min

common-utilities (Library) reference

Shared composition utilities for babysitter processes. These modules package the

Page nodewiki/library/common-utilities.mdNearby pages · 135Documents · 1

Continue reading

Nearby pages in the same section.

accessibility (Library)Aerospace Engineering Specialization (Library)AI Agents and Conversational AI Specialization (Library)Algorithms and Optimization Specialization (Library)Arts and Culture Specialization (Library)ATDD/TDD Methodology (Library)authoring (Library)AutoMaker (Library)Automotive Engineering Specialization (Library)Backend Development (Library)BDD/Specification by Example (Library)Bioinformatics and Genomics Specialization (Library)Biomedical Engineering Specialization (Library)BMAD Method (Library)business/ (folded) (Library)Business Analysis and Consulting (Library)Business Strategy and Operations (Library)Business Strategy Specialization (Library)CC10X Methodology (Library)CCPM - Claude Code PM Methodology (Library)Chemical Engineering Specialization (Library)Civil Engineering Specialization (Library)ClaudeKit Methodology (Library)Cleanroom Software Engineering (Library)CLI and MCP Development Specialization (Library)Code Migration and Modernization Specialization (Library)COG Second Brain (Library)collaboration (Library)Communication specialization (Library)Composition: Aerospace Flight Control (Waterfall + V-Model + Cleanroom + inline Formal Verification) (Library)Composition: Legacy Modernization (Event Storming + DDD + FDD + Strangler Fig + RUP) (Library)Composition: Open Source Data-Validation Framework (TDD + BDD + Kanban + XP + Continuous Deployment) (Library)Composition: Regulated Greenfield (V-Model + DDD + Cleanroom + Waterfall) (Library)Composition: SaaS Analytics Dashboard (JTBD + Impact Mapping + Spec-Kit + Kanban + XP) (Library)Composition: Smart Product Recommendations (DDD + Hypothesis-Driven Development + BDD + Kanban) (Library)Composition: Startup MVP (Shape Up + Example Mapping + TDD + Scrum) (Library)Computer Science Specialization (Library)Cryptography and Blockchain Development Specialization (Library)Customer Experience and Support Specialization (Library)customer-support (Library)Data Engineering, Analytics, and BI Specialization (Library)Data Privacy Compliance (Library)Data Science and Machine Learning Specialization (Library)Intelligence, Decision Support and Decision Making (Library)Desktop Product Development Specialization (Library)developer-relations (Library)DevOps, SRE, and Platform Engineering Specialization (Library)Digital Marketing and Content Strategy Specialization (Library)Domain-Driven Design (DDD) Methodology (Library)Double Diamond Methodology (Library)Education and Learning Specialization (Library)Electrical Engineering Specialization (Library)Embedded Systems Engineering Specialization (Library)Entrepreneurship and Startup Processes (Library)Environmental Engineering Specialization (Library)Event Storming (Library)Everything Claude Code Methodology (Library)Example Mapping Methodology (Library)Extreme Programming (XP) (Library)Feature-Driven Development (FDD) (Library)Finance, Accounting, and Economics Specialization (Library)FPGA Programming and Hardware Description Specialization (Library)Game Product Development Specialization (Library)Gas Town Methodology (Library)GPU Programming and Parallel Computing (Library)GSD-Adapted Workflows for Babysitter SDK (Library)Healthcare and Medical Management Specialization (Library)Human Resources and People Operations Specialization (Library)Humanities and Anthropology Specialization (Library)Hypothesis-Driven Development (Library)Impact Mapping Methodology (Library)Incident Management (Library)Industrial Engineering Specialization (Library)internationalization (Library)Jobs to Be Done (JTBD) Methodology (Library)Kanban (Library)Knowledge Management (Library)Legal and Compliance Specialization (Library)Logistics and Operations Specialization (Library)Maestro App Factory (Library)Marketing and Brand Management Specialization (Library)Materials Science Specialization (Library)Mathematics Specialization (Library)Mechanical Engineering Specialization (Library)media (Library)Meta Specialization - Process, Skill, and Agent Creation (Library)Metaswarm Methodology (Library)MLOps (Library)Mobile Product Development Specialization (Library)Nanotechnology Specialization (Library)Network Programming and Protocols Specialization (Library)Observability specialization (Library)Enhanced Ontology-Driven Development (ODD) Methodology (Library)Operations Management Specialization (Library)Performance Optimization and Profiling Specialization (Library)Philosophy and Theology Specialization (Library)Physics Specialization (Library)Pilot Shell Methodology for Babysitter SDK (Library)Planning with Files (Library)Procurement — business domain specialization (Library)Product Management and Product Strategy Specialization (Library)Production contract (Library)Programming Languages and Compilers Development Specialization (Library)Project Management and Leadership Specialization (Library)Public Relations and Communications Specialization (Library)QA, Testing, and Test Automation (Library)Quantum Computing Specialization (Library)Release Engineering (Library)Research Specialization (Library)Robotics and Simulation Engineering Specialization (Library)RPIKit Methodology (Library)Ruflo Methodology (Library)RUP (Rational Unified Process) (Library)Sales and Business Development Specialization (Library)Scientific Discovery and Problem Solving Specialization (Library)Scrum (Library)SDK, Platform, and Systems Development (Library)Security, Compliance, and Risk Management Specialization (Library)Security Research and Vulnerability Analysis Specialization (Library)Shape Up (Library)Shared (Cross-Domain Assets) (Library)Social Sciences Specialization (Library)Software Architecture and Design Patterns Specialization (Library)sourcing/ (folded) (Library)Spec Kit Methodology (Library)Spiral Model (Library)Superpowers Extended Methodology (Library)Supply Chain Management Specialization (Library)Technical Documentation Specialization (Library)Travel (Curated-Dataset + SQL-Tool Pattern) (Library)UX/UI Design and User Experience Specialization (Library)V-Model Methodology (Library)Venture Capital and Investment Due Diligence Specialization (Library)Waterfall Methodology (Library)Web Product Development Specialization (Library)

Documented graph nodes

Records linked directly from this page’s Page node.

Common Utilities · Specialization

common-utilities

Shared composition utilities for babysitter processes. These modules package the current quality bar — routed breakpoints, adversarial evidence-mandatory gates, parallel fan-out, kip recall/assert checkpoints — as importable helpers so processes stop re-implementing the patterns by hand.

Import pattern (from a process file elsewhere in the library):

js
import {
  routedBreakpoint,
  adversarialGate,
  kipRecall,
  kipAssert,
  KIP_CLI_NOTE,
} from '../common-utilities/routed-gate-combinators.js';
// or via the barrel:
import { fanOutFanIn, pipeline, routedBreakpoint } from '../common-utilities/index.js';

Module catalog

ModuleExportsPurpose
docx-conversion.jsconvertToDocxTaskConvert an HTML artifact to .docx via pandoc
parallel-combinator.jsfanOutFanIn, pipelineFan-out/fan-in and phased pipelines for concurrent tasks
routed-gate-combinators.jsroutedBreakpoint, adversarialGate, adversarialCriticTask, gateFixerTask, kipRecall, kipAssert, kipRecallTask, kipAssertTask, KIP_CLI_NOTERouted breakpoints, adversarial IRON-LAW quality gates, kip checkpoints
routed-gate-combinators-demo.jsroutedGateCombinatorsDemo, draftUsageGuideTaskExemplar process exercising all three combinators end-to-end

docx-conversion

A shared HTML-to-DOCX conversion task using pandoc with graceful fallback.

**Usage:**

javascript
import { convertToDocxTask } from '../common-utilities/index.js';

// In your process:
const result = await ctx.task(convertToDocxTask, {
  htmlPath: '/path/to/input.html',
  docxPath: '/path/to/output.docx'
});
// result: { success: true, path: '...', converter: 'pandoc' }
// or:     { success: false, path: '...', reason: 'pandoc not installed', converter: 'none' }

parallel-combinator

Utility functions for parallel task execution with fan-out/fan-in patterns.

**fanOutFanIn** - Run multiple tasks in parallel with shared input:

javascript
import { fanOutFanIn } from '../common-utilities/index.js';

const [strengths, weaknesses] = await fanOutFanIn(ctx, { essay, analysis }, [
  { task: evaluateStrengthsTask },
  { task: evaluateWeaknessesTask }
]);

**pipeline** - Sequential phases with optional parallel steps (a nested array means the steps inside it run in parallel as one phase):

javascript
import { pipeline } from '../common-utilities/index.js';

const result = await pipeline(ctx, { essay }, [
  { task: analyzeTask, key: 'analysis' },
  [
    { task: strengthsTask, key: 'strengths' },
    { task: weaknessesTask, key: 'weaknesses' }
  ],
  { task: synthesizeTask, key: 'document' }
]);

routedBreakpoint

Thin wrapper over ctx.breakpoint that makes routing metadata non-optional: breakpointId, expert, and non-empty tags are **required** (the helper throws if any is missing — no fallbacks), strategy defaults to 'single', and label defaults to the breakpointId. Real call site from the demo process:

js
const acceptance = await routedBreakpoint(ctx, {
  question: 'Usage guide passed the adversarial gate. Approve the combinators API ergonomics and accept the demo?',
  artifactPath,
  gate,
}, {
  breakpointId: 'common-utilities.demo.owner-acceptance',
  expert: 'owner',
  tags: ['common-utilities', 'combinators', 'acceptance'],
  strategy: 'single',
});

Optional routing fields: label, autoApproveAfterN, presentAlwaysApprove. The BreakpointResult is returned unchanged.

adversarialGate

Fans out independent IRON-LAW critics over an artifact (concurrently, via ctx.parallel.all thunks), reduces their verdicts, runs a bounded fixer loop between rounds, and escalates to a routed owner breakpoint (<gateId>.gate-escalation) when the fix budget is exhausted. Real call site from the demo process:

js
const gate = await adversarialGate(ctx, {
  gateId: 'common-utilities.demo.usage-guide',
  artifact: {
    path: artifactPath,
    description: 'Usage guide for the routed-gate combinators',
  },
  critics: [
    {
      name: 'accuracy-critic',
      role: 'API accuracy reviewer',
      focus: 'every documented signature, default, and contract must match the module source exactly',
    },
    {
      name: 'ergonomics-critic',
      role: 'API ergonomics reviewer',
      focus: 'call sites must be shorter and safer than hand-rolled ctx.breakpoint/ctx.parallel equivalents; flag any awkward required argument or footgun',
    },
  ],
  ironLaw: [
    'Verify every code snippet in the guide against the actual exports in library/specializations/common-utilities/routed-gate-combinators.js — cite file and line for each verified claim.',
  ],
  maxFixAttempts,
  fixer: {},
});

Gate contract — the result is always { passed, issues: [{critic, severity, description}], evidence: [{critic, evidence: string[]}], attempts, escalated }. **Evidence is mandatory for a pass**: a critic verdict counts as passed only when passed === true AND its evidence array is non-empty; an evidence-empty pass is coerced to a severity: 'protocol' failure (PASS verdict rejected: no evidence supplied). gateId, a non-empty critics array, and an artifact.path are required — the combinator throws otherwise. fixer: {} opts into the built-in gateFixerTask; pass fixer: { task, args } for a custom fixer; omit fixer entirely to skip the fix loop and escalate directly on failure.

kipRecall / kipAssert

Recall-at-start and assert-at-end checkpoints wrapping agent tasks whose prompts embed KIP_CLI_NOTE. kipRecall requires a topic (throws if missing); a fresh or missing store is initialized and reported as factCount: 0 / storeInitialized: true, never an error. kipAssert requires a **non-empty** facts array (asserting nothing is a caller bug and throws); per-fact failures are reported in failed, never swallowed. Real call sites from the demo process:

js
const recall = await kipRecall(ctx, {
  kipDir,
  topic: 'routed-gate-combinators usage',
  kipModel,
  kind: 'library-enrichment',
});

const assertResult = await kipAssert(ctx, {
  kipDir,
  kipModel,
  kind: 'library-enrichment',
  facts: [
    {
      subject: 'process:routed-gate-combinators-demo',
      predicate: 'exercised',
      object: 'combinator:adversarialGate',
      props: { gateId: 'common-utilities.demo.usage-guide' },
    },
  ],
});

kip CLI note (Windows-safe)

Embedded verbatim into every kip-touching agent prompt as KIP_CLI_NOTE:

kip CLI resolution: use kip if on PATH; otherwise invoke Windows-safe as

node packages/kip-sdk/dist/cli/kip.js (npm exec bin resolution is

unreliable on Windows). Always pass --dir <kipDir> and --json. If the

store does not exist yet, run kip init --dir <kipDir> --create first and

treat an empty recall as a fresh brain, not an error. For kip ask /

kip resolve structured paths always pass --model <kipModel> explicitly

(weak default models under-fire on JSON-schema adjudication).

Why these helpers exist (quality-bar rationale)

The docx-conversion and parallel-combinator utilities were extracted from a retrospective analysis of essay-critique, extract-oral-prep, and essay-grading processes where identical patterns were duplicated across multiple files.

A census of the library found only ~15 of ~2035 breakpoint-using files pass routing options to ctx.breakpoint, and common-utilities had no gate or breakpoint combinators at all. Every future retrofit batch and new process should import these helpers instead of re-implementing routing metadata, IRON-LAW critic prompts, evidence reduction, and Windows-safe kip invocation by hand — the combinators make the quality bar the path of least resistance.

Running the demo process

The exemplar process routedGateCombinatorsDemo exercises all three combinators end-to-end and writes its artifact under ctx.artifactsDir (no repo files are touched by demo runs):

bash
babysitter run:create \
  --process specializations/common-utilities/routed-gate-combinators-demo#routedGateCombinatorsDemo \
  --inputs '{"kipEnabled": true, "maxFixAttempts": 2}'
babysitter run:iterate <runId>

Inputs (all optional): topic, kipEnabled (default true), kipDir (default .a5c/kip), kipModel (default sonnet), maxFixAttempts (default 2). The run pauses at the common-utilities.demo.owner-acceptance breakpoint for owner review, and — only if the gate exhausts its fix budget — at the routed common-utilities.demo.usage-guide.gate-escalation breakpoint.

Trail

Wiki

Library

common-utilities (Library)

Continue reading

accessibility (Library)
Aerospace Engineering Specialization (Library)
AI Agents and Conversational AI Specialization (Library)
Algorithms and Optimization Specialization (Library)
Arts and Culture Specialization (Library)
ATDD/TDD Methodology (Library)
authoring (Library)
AutoMaker (Library)

Page record

Open node ledger

wiki/library/common-utilities.md

Documents

Common Utilities · Specialization