Description
Extend the v2 package format to support abstract declarations for commands and skills, completing the metaconcept model started with practices and MCP servers.
Context
v2 (0.12.0) shipped with abstract PracticeDeclaration (for rules/instructions) and MCPDeclaration (for MCP servers). The original vision (#62) also included abstract representations for:
- Commands: Capability declarations (what it does, inputs, outputs) that translate to tool-native formats (
.claude/commands/, .roo/commands/, etc.)
- Skills: Workflow declarations (steps, context, outputs) that translate to skill files
Currently, commands and skills from v1 packages are handled as raw file copies. Adding abstract declarations would enable AI-powered adaptation of commands across tools.
Affected Files
devsync/core/practice.py — Add CommandDeclaration, SkillDeclaration dataclasses
devsync/core/package_manifest_v2.py — Parse new declaration types from manifest
devsync/llm/prompts.py — Add extraction prompts for commands/skills
devsync/llm/response_models.py — Add response parsing for new types
devsync/core/extractor.py — Extract command/skill declarations
devsync/core/adapter.py — Adapt commands/skills to target tools
devsync/ai_tools/base.py — Add command/skill translation methods
tests/unit/core/test_practice.py — Tests for new declaration types
Acceptance Criteria
Description
Extend the v2 package format to support abstract declarations for commands and skills, completing the metaconcept model started with practices and MCP servers.
Context
v2 (0.12.0) shipped with abstract
PracticeDeclaration(for rules/instructions) andMCPDeclaration(for MCP servers). The original vision (#62) also included abstract representations for:.claude/commands/,.roo/commands/, etc.)Currently, commands and skills from v1 packages are handled as raw file copies. Adding abstract declarations would enable AI-powered adaptation of commands across tools.
Affected Files
devsync/core/practice.py— AddCommandDeclaration,SkillDeclarationdataclassesdevsync/core/package_manifest_v2.py— Parse new declaration types from manifestdevsync/llm/prompts.py— Add extraction prompts for commands/skillsdevsync/llm/response_models.py— Add response parsing for new typesdevsync/core/extractor.py— Extract command/skill declarationsdevsync/core/adapter.py— Adapt commands/skills to target toolsdevsync/ai_tools/base.py— Add command/skill translation methodstests/unit/core/test_practice.py— Tests for new declaration typesAcceptance Criteria
CommandDeclarationdataclass with name, description, inputs, outputs, implementation_hintSkillDeclarationdataclass with name, description, steps, context_needed, outputsdevsync extractdetects and extracts commands from supported tool formatsdevsync installtranslates command declarations to target tool's native formatdevsync-package.yamlschema supportscommandsandskillssectionsinvoke test-unitinvoke lint