agentleFS
NeerajG03NeerajG03/JEFF/.agents/skills/provider-integration/SKILL.md

provider-integration

Skill1 starsChanged 3 months agoMITView on GitHub

Adds a new agent CLI provider to JEFF from discovery through a real end-to-end smoke test. Use when asked to integrate Codex or another agent/provider, add an AgentProvider, support a new agent CLI, or audit whether a provider integration is complete. Do not use for adding a model to an already-supported provider.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

22 rules. About 0 are common, 11 are distinctive, and 11 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 11

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read the provider's current official docs and inspect the installed binary.

    line 32
  2. Distinctive:

    Run commands equivalent to these without changing user configuration:

    line 36
  3. Very specific:

    Read references/jeff-provider-surface.md.

    line 66
  4. Very specific:

    Do not force unsupported features into fake implementations.

    line 81
  5. Distinctive:

    Write a short design note before code.

    line 87
  6. Very specific:

    Keep correctness before launch independent of hooks.

    line 95
  7. Very specific:

    Add the AgentTool constant in jeff.go.

    line 103
  8. Very specific:

    Add agent_<name>.go and register an AgentProvider in init().

    line 104
  9. Distinctive:

    Create only provider-owned directories and defaults.

    line 109
  10. Very specific:

    Add the provider to schemas/jeff-config.json and schema-sync tests.

    line 113
  11. Distinctive:

    Verify the primary context filename and every alias in home and task workspaces.

    line 114
  12. Distinctive:

    Do not assume config and skills share a single root directory.

    line 116
  13. Distinctive:

    Add doctor detection and a clear install/auth hint.

    line 117
  14. Distinctive:

    Update setup prompts, completion text, README tables, and config docs.

    line 118
  15. Very specific:

    Add a hooks.Delivery only when the CLI has a supported hook system.

    line 122
  16. Very specific:

    Use a provider-owned artifact directory (.codex/hooks, .claude/settings.json).

    line 123
  17. Distinctive:

    Do not make two deliveries discover or delete each other's generated scripts.

    line 124
  18. Distinctive:

    Add the provider script key to each compatible built-in hook generator.

    line 126
  19. Distinctive:

    Verify session ID capture before claiming resume works.

    line 128
  20. Distinctive:

    Run all static checks:

    line 133
  21. Very specific:

    Test both default unattended mode and --safe.

    line 163
  22. Very specific:

    Read references/codex-case-study.md when integrating Codex.

    line 182

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

JEFF Provider Integration

Integrate a provider by proving its real CLI behavior first, then mapping its capabilities onto JEFF. Do not copy another provider and assume matching flags, session behavior, hook payloads, or file locations.

Decision Tree

New agent CLI
  |
  +-- interactive TUI? -------- no --> stop: JEFF workers need an interactive mode
  |
  +-- exact session resume? --- no --> support fresh launch; mark resume unsupported
  |
  +-- lifecycle hooks? -------- no --> keep setup correct without hooks
  |                               yes --> add a Delivery and contract tests
  |
  +-- native skills? ---------- no --> rely on the context file and commands
  |
  +-- headless mode? ---------- no --> exclude memory curation
                                  yes --> implement BuildCurateArgs

1. Lock The CLI Contract

Read the provider's current official docs and inspect the installed binary. Record the binary version and exact commands. Treat online examples and another JEFF provider as hints, not proof.

Run commands equivalent to these without changing user configuration:

command -v <binary>
<binary> --version
<binary> --help
<binary> <resume-subcommand> --help
<binary> <headless-subcommand> --help

Build a capability matrix before editing code:

CapabilityEvidence to captureJEFF consumer
Interactive launchcommand, flags, whether a prompt keeps the TUI alivepickup, work, orchestrator, crew
Safe and unattended modesapproval and sandbox flags separately--safe, default worker launch, curation
Model selectionvalid IDs, aliases, provider overlapmodel inference and persona defaults
Resumeexact ID syntax, latest fallback, cwd scopejeff crew resume
Headless runprompt input, output, exit codes, repo requirementmemory curation
Context filefilename, lookup order, trust rulestask and home instructions
Skills and commandsexact directories and formatsskill and command injection
Hooksconfig location, events, stdin/output schema, trustcontext refresh, heartbeat, session capture
Authlogin flow, environment variables, credential locationdoctor and setup docs
Terminal behaviorstartup time, bracketed paste, Ctrl-C, process exittmux delivery and worker state

For claims that affect process lifetime, resume, or tmux input, run a tiny manual probe. Help text alone does not prove that a prompt stays interactive.

2. Trace JEFF End To End

Read references/jeff-provider-surface.md. Then run the bundled audit from the JEFF repository root:

uv run .agents/skills/provider-integration/scripts/audit_provider_surfaces.py .

Classify each finding as:

  • Required: provider identity, launch command, model routing, config schema, home setup, context path, pickup/work launch, crew launch, doctor, and tests.
  • Capability-dependent: resume, hooks, native skills, custom commands, memory suppression, headless curation, and provider model aliases.
  • Documentation-only: README, setup guide, config reference, and shell help.

Do not force unsupported features into fake implementations. Return an empty capability where AgentProvider allows it. If the interface cannot express a real provider behavior, change the shared contract and its fake provider first.

3. Write The Integration Design

Write a short design note before code. Include:

  1. The verified command table for fresh, safe, unattended, resume, and headless runs.
  2. The capability matrix with unsupported items called out.
  3. The files to change, grouped by core provider, hooks, lifecycle, setup, and docs.
  4. Trust and security choices, especially sandbox policies and project-local config.
  5. An end-to-end test path and the installed CLI version used for it.

Keep correctness before launch independent of hooks. Project hook trust can block the first SessionStart, so task context, memory, and skills must already exist before the agent starts.

4. Implement In Layers

Core Provider

  1. Add the AgentTool constant in jeff.go.
  2. Add agent_<name>.go and register an AgentProvider in init().
  3. Build argument slices without shell quoting. Shell quoting belongs where JEFF turns the command into a tmux command string.
  4. Reject models owned by another provider. Avoid broad model matching that makes InferBackend depend on provider registration order.
  5. Create only provider-owned directories and defaults. Never overwrite user files.

Workspace And Setup

  1. Add the provider to schemas/jeff-config.json and schema-sync tests.
  2. Verify the primary context filename and every alias in home and task workspaces.
  3. Map the real native skill directory (.agents/skills, .claude/skills, etc.). Do not assume config and skills share a single root directory.
  4. Add doctor detection and a clear install/auth hint.
  5. Update setup prompts, completion text, README tables, and config docs.

Hooks And Lifecycle

  1. Add a hooks.Delivery only when the CLI has a supported hook system.
  2. Use a provider-owned artifact directory (.codex/hooks, .claude/settings.json). Do not make two deliveries discover or delete each other's generated scripts.
  3. Map every event name, matcher, timeout unit, input field, and output field.
  4. Add the provider script key to each compatible built-in hook generator.
  5. Export provider identity when a shared hook body needs provider-specific behavior.
  6. Verify session ID capture before claiming resume works.
  7. Tune prompt paste and Ctrl-C timing with a real tmux session.

5. Verify By Contract

Run all static checks:

gofmt -w <changed-go-files>
go test ./...
go vet ./...
go build -o /tmp/jeff-dev ./cmd/jeff/
uv run .agents/skills/provider-integration/scripts/audit_provider_surfaces.py . --provider <name>

Add tests for:

  • provider registration and config-schema parity
  • fresh, safe, model, prompt, resume, and headless argument vectors
  • foreign-model rejection and inference ambiguity
  • idempotent home defaults that preserve user files
  • context aliases, skill injection, and unsupported capabilities
  • hook install, update, disable, orphan cleanup, event mapping, and ownership
  • pickup, orchestrator, worker start, message send, stop, and resume command building

Then use the throwaway JEFF binary for a real smoke test. Never replace the live jeff binary.

gig task -> /tmp/jeff-dev pickup -> task/worktree/context/skills/hooks
         -> provider TUI -> tool call -> hook heartbeat/checkpoint
         -> crew message -> stop -> captured session ID -> crew resume
         -> checkpoint -> ship --dry-run -> done

Test both default unattended mode and --safe. Confirm that the provider remains interactive after the initial prompt and that a resumed worker continues the same session rather than starting a new one.

Failure Recovery

SymptomLikely causeAction
Provider compiles but cannot be selectedmissing enum/schema/config surfacerun the audit and schema-sync test
Worker exits after its first promptprompt flag starts headless modeset SupportsInlinePrompt false and tune tmux paste
Persona default selects the wrong CLImodel ownership overlaps another providernarrow OwnsModel; add pairwise tests
Resume starts a new chatwrong ID, arg order, or hook capture fieldinspect the real session payload and resume help
Hooks work only after manual approvalproject or hook trust gatekeep pre-launch setup complete; document or safely bypass trust
Disabling one provider removes another provider's hookshared artifact discoveryisolate generated files and prove ownership before deletion
Headless curation hangsit can still ask for auth, approval, or repo trustadd preflight checks and truly noninteractive flags
Skills are missingnative path differs from ConfigDir/SkillsSubdirchange the provider contract instead of adding ad hoc aliases

Codex Example

Read references/codex-case-study.md when integrating Codex. Re-check every flag against the installed Codex version because the CLI changes independently of JEFF.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.