Agentic AI Atlasby a5c.ai
OverviewWikiGraphFor AgentsEdgesSearchWorkspace
/
GitHubDocsDiscord
iiRecord
Agentic AI Atlas · Genty Babysitter-SDK Coupling Audit
page:docs-genty-decoupling-coupling-audita5c.ai
Search record views/
Record · tabs

Available views

II.Record viewspp. 1 - 1
overviewarticlejsongraph
III.Related pagespp. 1 - 1
II.
Page reference

page:docs-genty-decoupling-coupling-audit

Reading · 5 min

Genty Babysitter-SDK Coupling Audit reference

Generated: 2026-06-07

Pagewiki/docs/genty-decoupling/coupling-audit.mdOutgoing · 0Incoming · 1

Genty Babysitter-SDK Coupling Audit

Generated: 2026-06-07

Summary

CategoryImportsClassification
run-lifecycle57must-extract
types-only72should-internalize
harness-registry21can-keep
utilities22should-internalize
effect-orchestration17must-extract
process-creation13must-extract
journal5must-extract
governance5must-extract
session5must-extract
external-agents2must-extract
**Total****219**

**68 files** across **5 packages** import from @a5c-ai/babysitter-sdk.

Imports by Package

PackageFilesImports
platform57185
cli922
runtime810
core12
tui-plugins00

Classification Detail

must-extract (104 imports, 47.5%)

These categories represent core babysitter runtime functionality that genty uses directly. To decouple, these must be extracted into a shared interface layer or absorbed into genty's own runtime abstractions.

resolveRunsDir, resolveExistingRunDir, DEFAULTS, createRunDir, readStateCache, readTaskDefinition, readTaskResult, serializeAndWriteTaskResult, withRunLock, callHook, loadCompressionConfig, createScopedRuntimeConfigState, createReplayEngine, createProcessContext, withProcessContext, getActiveProcessContext, requireProcessContext, STATE_CACHE_SCHEMA_VERSION, createStateCacheSnapshot, journalHeadsEqual, normalizeJournalHead, normalizeSnapshot, rebuildStateCache, writeStateCache, hashInvocationKey, RunFailedError, replaySchemaVersion, createBabysitterMcpServer, getRunDir

  • **run-lifecycle (57)**: createRun, loadJournal, readRunMetadata,

buildEffectIndex, getEffectiveConcurrency, commitEffectCancellation, EffectRequestedError, EffectPendingError, EffectCancelledError, ParallelPendingError

  • **effect-orchestration (17)**: commitEffectResult, orchestrateIteration,

composeProcessCreatePrompt, resolveActiveProcessLibrary, getDefaultProcessLibrarySpec, renderBreakpointHandling, renderResultsPosting, renderCommandTemplate, renderTemplateString, resetGlobalTaskRegistry

  • **process-creation (13)**: createPromptContextFromCatalog,
  • **journal (5)**: appendEvent (used in 3 files across platform and runtime)

evaluateAutoApproval, isStatefulRule

  • **governance (5)**: addRule, readRules, removeRule,

readSessionMarker, normalizeSessionStateDir

  • **session (5)**: resolveSessionIdWithMarker, getSessionMarkerPath,
  • **external-agents (2)**: discoverExternalAgents (used in 2 files)

can-keep (21 imports, 9.6%)

Harness-registry symbols are native to genty's adapter layer. These re-exports and direct usages are the intended integration surface between genty and the SDK.

checkCliAvailable, KNOWN_HARNESSES, detectAdapter, getAdapterByName, listSupportedHarnesses, getAdapter, setAdapter, resetAdapter, createClaudeCodeAdapter, createInternalContext

  • **harness-registry (21)**: discoverHarnesses, detectCallerHarness,

should-internalize (94 imports, 42.9%)

Types and utility functions that should be copied or re-declared within genty to eliminate the import dependency. Most are simple type re-exports or standalone helper functions with no state.

IterationResult, BreakpointRule, BreakpointConfig, AutoApprovalResult, ActionCategory, ApprovalPosture, InteractionKind, PromptContext, CompressionConfig, EffectIndex, AppendEventResult, ExternalAgentDiscovery, ExternalAgentInfo, ParsedArgs, RuntimeConfigValueType, PolicyRuleKind, PolicyConditionOp, PolicyAction, PolicyCondition, PolicyRule, StatefulPolicyRule, PolicyEvaluationContext, PolicyDecision, PolicyDecisionLog, PolicyEngine, OrchestrateOptions, CommitEffectResultOptions, CommitEffectResultArtifacts, ProcessContext, DefinedTask, CreateRunOptions, CreateRunResult, ReplayEngine, CreateReplayEngineOptions, StateCacheSnapshot, StateCacheJournalHead, DerivedEffectSummary

  • **types-only (72)**: JournalEvent, JsonRecord, EffectAction,

writeFileAtomic, parsePattern, matchPattern, nextUlid, densityFilterText, estimateTokens, formatErrorWithContext, isBabysitterError, suggestCommand, toStructuredError, applyPositionalArgs, BOOLEAN_FLAGS, FLAG_PARSERS, __resetCacheForTests, __setAncestorResolverForTests

  • **utilities (22)**: BabysitterRuntimeError, ErrorCategory,

Top 10 Most-Coupled Files

RankFilePackageSymbolsCategories
1src/runtime/index.tsplatform38run-lifecycle, effect-orchestration, types-only
2src/api/breakpoints.tsplatform15governance, journal, run-lifecycle, types-only
3src/api/runs.tsplatform11effect-orchestration, run-lifecycle, types-only
4src/harness/index.tsplatform10harness-registry
5src/api/effects.tsplatform8journal, run-lifecycle, types-only
6src/harness/internal/createRun/utils.tsplatform8harness-registry, types-only, utilities
7src/harness/internal/createRun/prompts.tsplatform8process-creation, types-only
8src/harness/internal/createRun/__tests__/createRun.test.tsplatform8effect-orchestration, harness-registry, run-lifecycle, session, types-only, utilities
9src/cli/ui.tscli6utilities
10src/harness/internal/createRun/output.tsplatform5harness-registry, run-lifecycle, types-only, utilities

Observations

1. **platform dominates**: 84.5% of all imports (185/219) originate in @a5c-ai/genty-platform. Any decoupling effort should focus here first.

2. **runtime/index.ts is a barrel re-export**: The single file platform/src/runtime/index.ts re-exports 38 symbols. This is the largest coupling point and a natural extraction seam -- it effectively defines genty's runtime contract with the SDK.

3. **types-only is the largest category**: 72 imports (32.9%) are pure type imports. These are the cheapest to internalize: copy the type declarations into a @a5c-ai/genty-types package or a shared types.ts barrel, then drop the SDK dependency from those files.

4. **Duplicate modules across platform and runtime**: Several files exist in both platform/src/ and runtime/src/ with identical imports (e.g., cost/effectCost.ts, cost/journal.ts, observability/runStatus.ts, observability/health.ts, observability/timeline.ts, session/discovery.ts). These duplicates should be consolidated before decoupling.

5. **Deep path import**: breakpoints/delegation.ts imports from @a5c-ai/babysitter-sdk/dist/storage/atomic -- a private path that bypasses the SDK's public API. This is fragile and should be replaced with a public export or internalized.

6. **tui-plugins is fully decoupled**: Zero SDK imports -- already clean.

7. **core has minimal coupling**: Only 1 file with 2 imports (createScopedRuntimeConfigState + RuntimeConfigValueType).

8. **Governance types re-exported**: governance/types.ts re-exports 10 policy types and 1 function from the SDK. This is a clear candidate for type internalization.

Notes on String Literal References

The following files contain @a5c-ai/babysitter-sdk as string literals in prompt templates or test fixtures (NOT actual imports). These are excluded from the import counts above but are relevant for full decoupling:

  • planProcess/prompts.ts:108 -- prompt template for process authoring
  • planProcess/phase.ts:99 -- inline code example in system prompt
  • planProcess/recovery.ts:16-17 -- import path normalization regex
  • createRun.test.ts:1651,2068,2601,2826,2855,2959 -- test fixtures
  • externalTaskValidation.test.ts:34,62,98 -- test fixtures

Article source

The article body is owned directly by this record.

Related pages

No related wiki pages for this record.

Shortcuts

Open overview
Open JSON
Open graph