feat(skill-catalog-subscription): synced catalog + HTTP sync + MCP tools

Consumes the external Subscription Platform as source of truth for skill
content; reuses skills_learning domain models (extended with KnowledgeSkill)
and workflow.skill_exec resolver. HTTP/MCP deps land in api/ per
CONSTITUTION.md; synced skills use a physically separate SQLite file
(tasks/skills.sqlite3) to preserve the skill-authoring capability boundary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 10:33:23 +08:00
co-authored by Claude Opus 4.6
parent 763c1b2299
commit b94abde92a
13 changed files with 2608 additions and 38 deletions
+8 -1
View File
@@ -1,12 +1,19 @@
"""Local skill learning from completed task timelines."""
from skills_learning.config import SkillAuthoringConfig, load_config
from skills_learning.models import FlowStep, FlowTemplateSkill, Skill, SkillMetadata
from skills_learning.models import (
FlowStep,
FlowTemplateSkill,
KnowledgeSkill,
Skill,
SkillMetadata,
)
from skills_learning.store import SkillStore, get_default_store
__all__ = [
"FlowStep",
"FlowTemplateSkill",
"KnowledgeSkill",
"Skill",
"SkillAuthoringConfig",
"SkillMetadata",
+21
View File
@@ -166,6 +166,27 @@ class FlowTemplateSkill(Skill):
)
@dataclass(frozen=True)
class KnowledgeSkill(Skill):
content: str = ""
def to_dict(self) -> dict[str, Any]:
return {
**self.metadata.to_dict(),
"content": self.content,
}
@classmethod
def from_dict(cls, data: dict[str, Any]) -> "KnowledgeSkill":
return cls(
metadata=SkillMetadata.from_dict(data),
content=str(data.get("content") or ""),
)
def with_metadata(self, **changes: Any) -> "KnowledgeSkill":
return replace(self, metadata=replace(self.metadata, **changes))
def skill_embedding_text(skill: FlowTemplateSkill) -> str:
goal = skill.originating_goal or ""
return f"{skill.name}: {skill.description}\nOriginal goal: {goal}"