Project Structure¶
Package layout¶
src/role_forge/
cli.py
config.py
loader.py
models.py
groups.py
registry.py
platform.py
topology.py
adapters/
Module responsibilities¶
cli.py: user-facing commands such asadd,render,list,remove, andupdateconfig.py:roles.tomlloading and roles directory resolutionloader.py: canonical role loading from Markdown plus YAML frontmattermodels.py: shared Pydantic models for roles, hierarchy, targets, and outputsgroups.py: capability-group and bash-policy definitionsregistry.py: source parsing, fetch/update logic, and source-repository role discoveryplatform.py: target platform detection from project markerstopology.py: hierarchy, delegation, and output-layout validationadapters/: built-in renderers and adapter registry
Extension model¶
Third-party targets plug in through the role_forge.adapters entry-point group.
Built-in adapters inherit the shared BaseAdapter, which centralizes validation-aware rendering flow while leaving formatting details to each target.