-
Notifications
You must be signed in to change notification settings - Fork 0
Modify A Plugin
Note
Goal: Edit a crickets plugin's source, regenerate, and try it on a host before opening a PR.
Prereqs: crickets cloned locally; Python 3 + PyYAML (pip install pyyaml); claude and/or agy.
crickets is a source of truth (src/<group>/) plus a generator that emits committed native plugins under dist/. You edit src/, rebuild, dogfood, then submit the source and dist/ together. Never hand-edit dist/ — it's generated.
-
Edit a primitive under its group — e.g. a hook:
$EDITOR src/developer-safety/hooks/kill-switch/kill-switch.sh -
Regenerate
dist/(both hosts) + the repo-root marketplace pointer:python3 scripts/generate.py build
-
Confirm the generated plugin has your changes:
git diff dist/
-
Try it on a host — the two hosts differ:
claude --plugin-dir dist/claude-code/plugins/developer-safety # Claude: loads for one session, nothing installed agy plugin install "$PWD/dist/antigravity/plugins/developer-safety" # Antigravity: actually installs — uninstall when done
-
(Optional — CI runs this on your PR.) For faster feedback, run the full gate battery locally before pushing:
bash scripts/check-all.sh
-
Open a PR — commit the source and the regenerated
dist/together (they ship as one change):git checkout -b <branch> git add src/ dist/ .claude-plugin .agents git commit -m "feat(<group>): <what changed>" git push -u origin <branch> gh pr create --fill # or open the PR on GitHub
CI runs the drift gate + the unit/structural gates on the PR.
- A new primitive kind or per-host mapping may need a generator/emitter change — see Manifest-Schema.
- Some hooks behave differently on Antigravity (it runs plugin hooks observe-only, so a veto/inject hook won't enforce there) — see Compatibility.
-
Writing a host-portable hook? Resolve the workspace from the host's stdin hook-input, not
cwd— the two hosts invoke hooks differently. See Hooks for the contract. -
generate.pysubcommands.buildwritesdist/+ the repo-root marketplace pointer fromsrc/;checkexits non-zero whendist/is out of sync withsrc/(the drift gate CI runs);cleanremovesdist/+ the pointer.
- Install crickets plugins — the three install modes.
-
Manifest-Schema — primitive frontmatter +
group.yaml. -
The source-of-truth + generator model — how crickets generates native plugins from one
src/.
🔧 How-to
- Plugin anatomy
- Repo layout
- Compatibility
- CI gates
- Troubleshooting
- Customization Types
- Manifest Schema
- Per-Host Paths
- Hooks
- Evaluator
- Antigravity Limitations
- Wiki Watch Config
- Style-learning loop
- Modify a plugin
- Add a skill
- Add a plugin
- Named plans
- Coordinator roles (pending)
- Obsidian vault backend (pending)
- GitHub Projects
- Testing Conventions
- Releasing Conventions
- Design Docs