feat: enhancement workflow preset system with multi-target CLI
- Add YAML-based enhancement workflow presets shipped inside the package (default, minimal, security-focus, architecture-comprehensive, api-documentation) - Add `skill-seekers workflows` subcommand: list, show, copy, add, remove, validate - copy/add/remove all accept multiple names/files in one invocation with partial-failure behaviour - `add --name` override restricted to single-file operations - Add 5 MCP tools: list_workflows, get_workflow, create_workflow, update_workflow, delete_workflow - Fix: create command _add_common_args() now correctly forwards each --enhance-workflow as a separate flag instead of passing the whole list as a single argument - Update README: reposition as "data layer for AI systems" with AI Skills front and centre - Update CHANGELOG, QUICK_REFERENCE, CLAUDE.md with workflow preset details - 1,880+ tests passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
85
src/skill_seekers/cli/parsers/workflows_parser.py
Normal file
85
src/skill_seekers/cli/parsers/workflows_parser.py
Normal file
@@ -0,0 +1,85 @@
|
||||
"""Workflows subcommand parser."""
|
||||
|
||||
from .base import SubcommandParser
|
||||
|
||||
|
||||
class WorkflowsParser(SubcommandParser):
|
||||
"""Parser for the workflows subcommand."""
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
return "workflows"
|
||||
|
||||
@property
|
||||
def help(self) -> str:
|
||||
return "Manage enhancement workflow presets"
|
||||
|
||||
@property
|
||||
def description(self) -> str:
|
||||
return (
|
||||
"List, inspect, copy, add, remove, and validate enhancement workflow "
|
||||
"presets. Bundled presets ship with the package; user presets live in "
|
||||
"~/.config/skill-seekers/workflows/."
|
||||
)
|
||||
|
||||
def add_arguments(self, parser) -> None:
|
||||
subparsers = parser.add_subparsers(dest="workflows_action", metavar="ACTION")
|
||||
|
||||
# list
|
||||
subparsers.add_parser(
|
||||
"list",
|
||||
help="List all available workflows (bundled + user)",
|
||||
)
|
||||
|
||||
# show
|
||||
show_p = subparsers.add_parser(
|
||||
"show",
|
||||
help="Print YAML content of a workflow",
|
||||
)
|
||||
show_p.add_argument("workflow_name", help="Workflow name (e.g. security-focus)")
|
||||
|
||||
# copy
|
||||
copy_p = subparsers.add_parser(
|
||||
"copy",
|
||||
help="Copy bundled workflow(s) to user dir for editing",
|
||||
)
|
||||
copy_p.add_argument(
|
||||
"workflow_names",
|
||||
nargs="+",
|
||||
help="Bundled workflow name(s) to copy",
|
||||
)
|
||||
|
||||
# add
|
||||
add_p = subparsers.add_parser(
|
||||
"add",
|
||||
help="Install a custom YAML file into the user workflow directory",
|
||||
)
|
||||
add_p.add_argument(
|
||||
"files",
|
||||
nargs="+",
|
||||
help="Path(s) to YAML workflow file(s) to install",
|
||||
)
|
||||
add_p.add_argument(
|
||||
"--name",
|
||||
help="Override the workflow filename (stem); only valid when adding a single file",
|
||||
)
|
||||
|
||||
# remove
|
||||
remove_p = subparsers.add_parser(
|
||||
"remove",
|
||||
help="Delete workflow(s) from the user directory (bundled workflows cannot be removed)",
|
||||
)
|
||||
remove_p.add_argument(
|
||||
"workflow_names",
|
||||
nargs="+",
|
||||
help="User workflow name(s) to remove",
|
||||
)
|
||||
|
||||
# validate
|
||||
validate_p = subparsers.add_parser(
|
||||
"validate",
|
||||
help="Parse and validate a workflow by name or file path",
|
||||
)
|
||||
validate_p.add_argument(
|
||||
"workflow_name", help="Workflow name or path to YAML file"
|
||||
)
|
||||
Reference in New Issue
Block a user