Skip to content

Add abstract command and skill declarations to v2 package format #83

@troylar

Description

@troylar

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

  • CommandDeclaration dataclass with name, description, inputs, outputs, implementation_hint
  • SkillDeclaration dataclass with name, description, steps, context_needed, outputs
  • devsync extract detects and extracts commands from supported tool formats
  • devsync install translates command declarations to target tool's native format
  • devsync-package.yaml schema supports commands and skills sections
  • Backward compatible — v1 file-copy still works for commands
  • Tests pass: invoke test-unit
  • Lint passes: invoke lint

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions