Conversation
- Remove policy change history feature * Delete internal/policy/history.go * Remove /api/policy/history endpoint from server * Remove history UI components (button, modal, event handlers) * Remove 'policy history' CLI command - Set default language for new rules from global settings * New rules now inherit languages from policy.defaults.languages * Improves consistency across policy rules 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove auto-save-checkbox references (element was deleted from HTML) * Remove event listener * Remove from saveSettings() and loadSettings() - Remove defaults-autofix references (element was deleted from HTML) * Remove from renderAll() * Remove from saveSettings() * Remove from applyPermissions() 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove auto-save timer and startAutoSave() function - Remove autoSave from appState.settings - Remove autoSave from localStorage loading/saving - Clean up all autoSave references This prevents the 30-second auto-save timer from triggering and attempting to save incomplete/invalid policy data. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ements Major Changes: 1. **Environment Variable Management (envutil package)** - Created internal/envutil package to centralize .env operations - Removed duplicate env-related functions across multiple files - Unified API key and policy path retrieval from .env files - Functions: GetAPIKey(), GetPolicyPath(), LoadKeyFromEnvFile(), SaveKeyToEnvFile() 2. **Policy Editor Improvements** - Add automatic policy path save on editor save - Implement file migration when policy path changes - Add convert prompt when rules are modified - Integrate convert API endpoint for linter config generation - Store original rules to detect changes 3. **Convert Command Enhancement** - Use POLICY_PATH from .env as default input - Output to same directory as input policy by default - Remove hardcoded paths 4. **Init Command Enhancement** - Create .sym/.env with default POLICY_PATH during init - Preserve existing API keys when adding POLICY_PATH 5. **MCP Server Enhancement** - Load policy path from .env instead of hardcoded path - Support both ANTHROPIC_API_KEY and OPENAI_API_KEY from .env Files Modified: - internal/envutil/env.go (new) - internal/cmd/api_key.go - internal/cmd/convert.go - internal/cmd/init.go - internal/engine/llm/engine.go - internal/llm/client.go - internal/mcp/server.go - internal/server/server.go - internal/server/static/policy-editor.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Fix errcheck linter error by explicitly handling the file.Close() error in deferred function. This resolves CI lint test failure.
Changes: - Add originalRBAC to appState for tracking RBAC changes - Implement createStableJSON helper for consistent object comparison - Extend change detection to include both rules and RBAC - Update conversion prompt to show what changed (rules/RBAC) - Add .mcp.json to .gitignore This enables the policy editor to detect RBAC changes and prompt for linter config generation when either rules or RBAC are modified. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Changes: - Add demo-template with description and language info - Add code-policy.json existence check in policy editor - Prompt conversion if code-policy.json is missing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…at/enhance-policy-editor # Conflicts: # internal/server/static/policy-editor.js
…at/enhance-policy-editor
Add automatic instructions file generation during MCP registration: 1. **Claude Code**: Appends to claude.md 2. **Cursor**: Creates .cursor/rules/symphony.mdc with frontmatter 3. **VS Code Copilot**: Creates .github/instructions/symphony.instructions.md Instructions include: - Check Symphony MCP server status before coding - Query conventions using symphony/query_conventions - Validate all changes using symphony/validate_code - Convention categories: security, style, documentation, error_handling, architecture, performance, testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace verbose "Next steps" with concise dashboard usage guide. Changes: - Remove file review and git commit instructions - Focus on dashboard functionality: * Manage roles (team members, permissions) * Edit policies (coding conventions) * Test validation (real-time rule checking) - Brief reminder to commit .sym/ folder More actionable and user-friendly guidance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Move dashboard usage message after MCP registration and API key setup, so users see it only after all initialization steps are complete. Improves UX by showing next steps at the end rather than interrupting the setup flow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
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
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.
feat: Enhance policy editor and add AI coding tool instructions
Overview
This PR enhances the policy editor with improved UX and adds automatic instructions file generation for AI coding tools during
sym init.Changes
1. AI Coding Tool Instructions Auto-Generation
When users register MCP servers during
sym init, Symphony now automatically creates instructions files for AI coding tools to ensure they properly use Symphony conventions.Supported Tools:
claude.md.cursor/rules/symphony.mdcwith MDC frontmatter.github/instructions/symphony.instructions.mdwith proper frontmatterInstructions Content:
All instructions files include concise, essential guidelines:
Before Writing Code
symphony/query_conventionstoolAfter Writing Code
symphony/validate_codetool2. Improved
sym initCompletion MessageBefore:
After:
3. Policy Editor Enhancements
Technical Details
Files Modified
internal/cmd/mcp_register.go- Added instructions generation logic (+187 lines)internal/cmd/init.go- Improved completion message and reordered outputImplementation
Instructions Generation Flow:
File Formats:
Testing
make buildsym initflowBreaking Changes
None. All changes are backward compatible.
Documentation
Instructions files are auto-generated with inline documentation. Users can customize them after generation.
Screenshots/Examples
New
sym initcompletion message:Generated
.cursor/rules/symphony.mdc: