| name | kamfw |
| description | Maintain MagicNet's shell KAM framework under src/MagicNet/lib/kamfw, including helpers, imports, i18n, logging, install filters, dependency checks, and EXIT handlers. |
MagicNet KAM Framework
Use this skill only inside the MagicNet repository when changing src/MagicNet/lib/kamfw or callers that depend on it.
Inspect Before Editing
Search the framework and its callers before adding a helper:
rg '<symbol-or-behavior>' src/MagicNet/lib/kamfw src/MagicNet
Prefer an existing helper. Put a reusable helper in src/MagicNet/lib/kamfw/<name>.sh (or the established __name__.sh internal form) and load it through import; do not bury shared helpers in customize.sh or hooks.
Framework Contract
- Use the framework's
print, info, warn, error, debug, and success wrappers for user-visible output. Use raw printf only for formatting that wrappers cannot express, and explain why.
- Register all user-visible text with
set_i18n; retrieve it through i18n/t. List new or changed keys in the PR.
- Check optional commands with
command -v. Missing required dependencies must fail fast through abort with an i18n message.
- Verify downloaded content with at least SHA-256; add signature verification when the trust model requires it. Never commit keys or secrets.
- Preserve user configuration by default. Interactive replacement needs explicit confirmation; non-interactive input uses the safe path (skip or create an update file).