mirror of
https://github.com/coleam00/Archon
synced 2026-04-21 13:37:41 +00:00
* Fix: Deprecate database command templates (#231) Database command templates still influenced routing and /command-invoke, preventing file-based commands from fully replacing them. Changes: - Remove template routing, handlers, and DB module - Add .archon/commands fallback for /command-invoke - Drop template table from schema/migrations and update docs/tests Fixes #231 * docs: update CLAUDE.md and README.md for template deprecation Remove all references to deprecated database command templates: - Update table count from 8 to 7 tables - Remove command_templates table from database schema sections - Remove "Command Templates (Global)" section from README - Remove /template-add, /template-delete, /templates command docs - Update "Custom command templates" to "Custom commands" - Remove references to global templates stored in database * Fix review findings: error handling, tests, migration guidance - Fix commandFileExists to only catch ENOENT, throw on unexpected errors (permissions, I/O) instead of silently returning false - Add test for file read failure after successful existence check - Add test for path traversal rejection via isValidCommandName - Add test for registered command taking precedence over fallback - Add migration guidance comments for users with existing templates
11 lines
540 B
SQL
11 lines
540 B
SQL
-- Migration: Drop deprecated command templates table
|
|
-- Command templates were replaced by file-based commands in .archon/commands
|
|
--
|
|
-- BREAKING CHANGE: If you have existing templates, export them before upgrading:
|
|
-- SELECT name, content FROM remote_agent_command_templates;
|
|
-- Then save each as .archon/commands/<name>.md in your repositories.
|
|
--
|
|
-- After this migration, use /command-invoke <name> instead of /<name>
|
|
|
|
DROP TABLE IF EXISTS remote_agent_command_templates;
|
|
DROP INDEX IF EXISTS idx_remote_agent_command_templates_name;
|