/Catalogue/Prompt/a5c-ai/a5c-ai-babysitter-integrate-harness

Origin: github

integrate-harness

Use when adding a new agent harness (CLI-based coding agent) adapter to adapters. Covers capability audit, adapter scaffold, session parsing, auth detection, hooks/plugins wiring, tests, and docs.

by a5c-ai · updated 8d ago · imported from GitHub

Installs0+0/7d
Security score61/100
Retention 14d0%
GitHub stars1.8K

Skill logic

Execution graph
User message
Prompt rewrites behaviour
Response

SKILL.md

View on GitHub ↗

integrate-harness

Goal: produce a production-quality XAdapter extends BaseAgentAdapter with full test coverage and documentation, matching the level of the existing 11 adapters (claude, codex, cursor, gemini, opencode, openclaw, copilot, hermes, pi, omp, adapters-remote).

Checklist

  1. Capability audit — read the harness's CLI docs. Fill in every AgentCapabilities field. Unknown? Set conservatively (false) and note in PR.
  2. Create packages/adapters/src/<name>-adapter.ts extending BaseAgentAdapter. Required: agent, displayName, cliCommand, minVersion, hostEnvSignals, capabilities, models[], defaultModelId, configSchema, buildSpawnArgs, parseEvent, detectAuth, getAuthGuidance, sessionDir, parseSessionFile, listSessionFiles, readConfig, writeConfig.
  3. Session parsing — if the harness stores JSONL sessions, delegate to parseJsonlSessionFile; otherwise write a custom parser and unit-test each event shape.
  4. Hooks — if the harness supports native hooks, override writeNativeHook and mirror into HookConfigManager. If not, rely on the base class's virtual hooks.
  5. Plugins — if it supports MCP servers under mcpServers in its config JSON, flip supportsPlugins: true, add pluginFormats: ['mcp-server'], and delegate to mcp-plugins.ts (see cursor/gemini/opencode/openclaw for the pattern).
  6. Register — add to packages/adapters/src/index.ts exports and to the default registry in packages/core/src/client.ts (if applicable).
  7. Tests — in packages/adapters/tests/<name>-adapter.test.ts:
    • capability shape
    • buildSpawnArgs for a few representative RunOptions
    • parseEvent for each JSONL type the harness emits
    • detectAuth for authenticated + unauthenticated states
    • session file parsing from a real fixture (redacted)
    • If plugins: add the adapter to mcp-plugins-parity.test.ts.
  8. CLI audit test — ensure packages/cli/tests/commands-audit.test.ts passes (it exercises every adapter via the built CLI).
  9. File-size limit — each source file must stay under 400 effective lines (local/max-file-lines). Split helpers into sibling modules if you're close.
  10. Docs — add a row to the README capabilities matrix and a paragraph in docs/02-agents/<name>.md.
  11. Changeset — npm run changeset, pick minor (new adapter), summarize.

Verification

npm run typecheck
npm run lint
npm test
npx vitest run packages/adapters/tests/<name>-adapter.test.ts

All existing tests must continue to pass — no regressions in commands-audit.

Common pitfalls

  • Forgetting to add the adapter to the default registry → commands-audit.test.ts won't exercise it.
  • JSONL parsers that assume a single event per line — some harnesses emit arrays.
  • Auth detection that reads env vars synchronously at construction time instead of detectAuth() — breaks testability.
  • buildSpawnArgs returning the string "undefined" for missing options — always gate with if (options.X != null).
  • Hook writers that overwrite rather than merge — use appendJsonHook or appendYamlHook.

Discussion

No comments yet — start the thread.

Sign in to join the discussion.

/More from a5c-ai/babysitter

a5c-ai· 8d agoSandbox
catalog-babysitter-users

Prompts · JavaScript · v0.1.0

Discover public GitHub repositories that import defineTask from @a5c-ai/babysitter-sdk and maintain a deduplicated catalog of those repositories in docs/repo-with-babysitter-processes.md. Excludes any repo named "babysitter" (to filter out forks of this monorepo). Invoke when asked to find, discover, catalog, or refresh "repos using babysitter", "babysitter in the wild", or "who else is using babysitter".

#agent-orchestration#agent-skills#agentic-ai

0 1.8K
a5c-ai· 8d agoSandbox
fix-failing-pipelines

Prompts · JavaScript · v0.1.0

This skill should be used when the user asks to "fix pipelines", "fix CI", "check staging pipelines", "fix failing workflows", "fix failing actions", or wants to find and fix failing GitHub Actions workflows on the staging branch of the babysitter repo.

#agent-orchestration#agent-skills#agentic-ai

0 1.8K
a5c-ai· 8d agoSandbox
process-builder

Prompts · JavaScript · v0.1.0

Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.

#agent-orchestration#agent-skills#agentic-ai

0 1.8K
a5c-ai· 8d agoSandbox
retrospect-external-babysitter-run

Prompts · JavaScript · v0.1.0

For a repository in the babysitter-users catalog, locate its babysitter processes and any committed runs (.a5c/runs/<runId>/) and perform a retrospective on a chosen run -- what went well, what failed, process suggestions, quality of effect design, breakpoint patterns -- mirroring the /babysitter:retrospect workflow but applied to an external repo. Invoke when asked to "retrospect on repo X's run", "analyze how someone else used babysitter", or "review an external babysitter run".

#agent-orchestration#agent-skills#agentic-ai

0 1.8K