Skip to content

Add Devin CLI hook adapter that respects defaultMode#624

Open
warelik wants to merge 1 commit into
DietrichGebert:mainfrom
warelik:fix/devin-cli-config-adapter
Open

Add Devin CLI hook adapter that respects defaultMode#624
warelik wants to merge 1 commit into
DietrichGebert:mainfrom
warelik:fix/devin-cli-config-adapter

Conversation

@warelik

@warelik warelik commented Jul 21, 2026

Copy link
Copy Markdown

Summary

  • Devin CLI installs ponytail as a skill (/ponytail:ponytail) but does not run plugin install scripts and does not load hooks bundled in .devin-plugin/plugin.json, so the user's defaultMode in ~/.config/ponytail/config.json (or PONYTAIL_DEFAULT_MODE) was ignored and the skill always fell back to full.
  • Add hooks/ponytail-devin.js, a lifecycle-hook adapter that locates the plugin checkout at runtime, reads the shared ponytail-config.js / ponytail-instructions.js, and:
    • injects the ruleset at the configured intensity on SessionStart;
    • handles /ponytail [lite|full|ultra|off], /ponytail default <mode>, and /ponytail status queries on UserPromptSubmit;
    • restores context after PostCompaction.
  • Add scripts/devin-cli-setup.sh, which copies the adapter into ~/.config/devin/hooks/ and registers it under the hooks key in ~/.config/devin/config.json (the supported location for user-level Devin CLI hooks).
  • Update README.md and docs/agent-portability.md with the install step.
  • Update package.json files so the Devin adapter ships with the npm package.
  • Add Devin CLI adapter tests to tests/hooks.test.js.

Test plan

  • node tests/hooks.test.js passes (SessionStart reads defaultMode: ultra, mode switching, report, deactivation).
  • node --test tests/*.test.js passes (82/82).
  • node scripts/check-versions.js passes.
  • node scripts/check-rule-copies.js passes.
  • Local devin -p verified with ~/.config/ponytail/config.json set to ultra: the model reports ultra and the state file is updated.

Devin CLI installs ponytail as a skill but does not run install scripts
or load hooks from the plugin directory, so the user's defaultMode in
~/.config/ponytail/config.json was ignored and the skill always fell back
to full.

Add hooks/ponytail-devin.js (lifecycle hook adapter) and
scripts/devin-cli-setup.sh (one-time registration in
~/.config/devin/config.json). The adapter locates the plugin checkout at
runtime, reads config/env for the default mode, and injects the ruleset
on SessionStart, tracks /ponytail switches on UserPromptSubmit, and
restores context after PostCompaction.

Update README and docs/agent-portability.md with the install step; add
tests for SessionStart, mode switching, reporting, and deactivation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant