-
Notifications
You must be signed in to change notification settings - Fork 0
fix(plugins): deduplicate code and fix cross-plugin imports #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add find_beads_dir() that searches up directory tree matching bd CLI behavior - Fix session_context.py, flow_check.py, pretool-beads-guard.py to use new function - Remove wildcard PreToolUse matcher (tmux-emoji-ops on every tool call) - Fix memory_validator.py to use session_output for proper hook formatting - Update go-dev agent skill path reference - Improve init-project.py to detect beads in parent directories
- Fix skill path references in ansible-scaffold.md, flux-refactor.md, harness commands, and workflow-scaffold.md - Move golangci-guard.py and pretool-go-get-check.py to go-dev plugin - Add plugin-specific hooks.json to go-dev and tdd plugins - Remove deprecated scripts: memory_validator.sh, skill_suggester.py - Update SKILL.md references to use new plugin structure
Context7 returns documentation examples which may contain older versions. Added alternative methods: helm repo search and GitHub releases. Updated cert-manager Context7 ID to correct /cert-manager/website.
- flow_check.py: Remove beads check (session_context.py handles it better) - session_bootstrap.py: Fix `/init-workflow` → `/workflow-init`
Move pretool-serializable-check.py from workflow to go-dev plugin since it's Go-specific (checks pgx.Serializable usage). Also activate golangci-guard.py which existed but was not registered. Improves plugin separation: domain-specific hooks belong in their respective plugins, not the general workflow plugin.
PreCompact hook was creating a new checkpoint every minute, causing 30+ empty memory files. Now uses 10-minute buckets and auto-cleans old empty checkpoints (> 2 hours) that were never filled in. Changes: - Timestamp uses 10-min granularity (HHMM → HH[00|10|20|30|40|50]) - Reuses existing checkpoint within same bucket - Auto-cleanup removes empty templates older than 2 hours
- Skip prompt-guard early for non-Helm/GitOps projects - Avoids unnecessary processing on every user prompt - Fix harness-init.md path to use sibling plugin reference
The previous implementation tried to manually find the beads database path which failed in complex worktree scenarios. Now relies on bd's auto-discovery which properly handles daemon connections and worktrees. Tested with writing to external projects - hook correctly allows writes when an active task exists in the main project.
Test files in subdirectories (e.g., internal/services/task_test.go) were not detected because has_tests() used non-recursive glob patterns like *_test.go instead of **/*_test.go. Changes: - Use recursive glob patterns (**/*_test.go, etc.) - Use next() with default for early exit on first match - Add sync notes between duplicate implementations
Both TDD and workflow plugins have detect_tdd_mode implementations. Since plugins may be installed independently, we keep both but add cross-reference comments to help maintainers keep them in sync.
The version-guard hook was missing try/except for json.load(sys.stdin). If the input was invalid JSON, the hook would crash instead of allowing the operation to proceed.
The beads CLI outputs "Created issue: <id>" not "Created: <id>". Updated regex to match actual output format.
Fixes discovered during Ralph Loop testing (iterations 7-10): workflow (1.2.0 → 1.2.1): - fix: use CamelCase for Python pytest verification patterns - fix: use relative import for notifier with fallback tdd (1.1.0 → 1.1.1): - refactor: import detect_tdd_mode from workflow instead of duplicating go-dev (1.1.0 → 1.1.1): - refactor: import response utilities from workflow - remove: duplicate lib/response.py and empty lib/ directory Benefits: - Single source of truth for shared utilities - No more "Keep in sync" comments - Easier maintenance
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fixes discovered during Ralph Loop testing (iterations 7-10):
Changes
-kpattern to use CamelCase; Fix relative import with fallbackdetect_tdd_modefrom workflow/lib/detector.pyBenefits
Test plan