Skip to main content

detect_context

Function detect_context 

Source
pub fn detect_context(project_file: &Path) -> ProjectContext
Expand description

Detect context for a skill-project.toml file

Detection logic (FR-006):

  1. If skill-project.toml is in directory containing SKILL.md → Skill
  2. If skill-project.toml is at project root (no SKILL.md in same directory) → Project
  3. Otherwise → Ambiguous (check content: [metadata].id vs [dependencies])