401e3e69af
Skills module (references SharedKernel only):
- Skill entity + SkillsDbContext (schema "skills") + InitialSkills migration: roles/tools/
context as text[], risk-tagged actions and golden tests as jsonb, a nullable vector(384)
embedding, unique (SkillKey, Version).
- SkillMarkdownParser: YAML frontmatter (YamlDotNet) + markdown body → SkillManifest.
- HashingSkillEmbedder: placeholder deterministic embedder so the pgvector path is real now;
swapped for ONNX/BYOK embeddings at M3-M4 (384-dim to match MiniLM/bge).
- SkillIndexer: parse → hash → embed → upsert; structural publish gate (roles + >=1 golden
test). Executing golden tests against a model + gating on edit distance lands at M4.
- Endpoints: GET /api/skills (filter by role/visibility), GET /api/skills/{key},
POST /api/skills/index (manual/admin) — all authenticated.
Verified: build green; ArchitectureTests 8/8 (Skills references only SharedKernel);
IntegrationTests 21/21 incl. a new skill-registry flow — index a SKILL.md, it publishes,
is queryable by role (and not under others), re-index dedups, malformed is 400, catalogue
needs auth.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
26 lines
648 B
C#
26 lines
648 B
C#
namespace TeamUp.Modules.Skills.Endpoints;
|
|
|
|
internal sealed record ActionDto(string Name, string Risk);
|
|
|
|
internal sealed record SkillSummary(
|
|
string SkillKey,
|
|
string Name,
|
|
string Version,
|
|
string? Summary,
|
|
List<string> Roles,
|
|
string Visibility,
|
|
string MinTier,
|
|
string Status,
|
|
List<ActionDto> Actions);
|
|
|
|
internal sealed record SkillDetail(
|
|
SkillSummary Skill,
|
|
string? Inputs,
|
|
string? Outputs,
|
|
List<string> Tools,
|
|
List<string> Context,
|
|
int GoldenTestCount,
|
|
string Body);
|
|
|
|
internal sealed record IndexRequest(string Content, string? SourceRepo, string? SourcePath, string? SourceCommit);
|