# 02 Modular Components (driven by agent_skills_fpf_spec)
Module 1: Kernel (capability definition)
- Source: `SKILL.md` Markdown body
- Output: instruction text (verbatim)
Module 2: Boundary (public contract)
- Source: `SKILL.md` YAML frontmatter
- Output: `name`, `description`, optional metadata
Module 3: Governance (execution constraints)
- Source: YAML subset: `allowed_tools`, `budgets`, `guards`
- Output: normalized constraints (e.g., `allowedTools: string[]`)
Module 4: Lifecycle (runtime enactment)
- Discovery: registry root → skill directories
- Loading: id → file path → parse Boundary/Kernel
- Validation: required fields + type checks + fail-closed
- Test surface: functions callable from BDD steps
Minimum in-code API:
- `parseSkillMarkdown(markdown) -> { boundary, kernel }`
- `loadSkillFromFile(registryRoot, skillId) -> { name, allowedTools, boundary, kernel, sourcePath }`