# new-module > Scaffold a new module instance with MANIFEST.yaml and required files. Keywords: module, scaffold, MANIFEST. - Author: willyu1007 - Repository: willyu1007/AI_First_Template - Version: 20251224182030 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-07 - Source: https://github.com/willyu1007/AI_First_Template - Web: https://mule.run/skillshub/@@willyu1007/AI_First_Template~new-module:20251224182030 --- --- name: new-module description: "Scaffold a new module instance with MANIFEST.yaml and required files. Keywords: module, scaffold, MANIFEST." --- # Scaffold: New Module Instance This document is an entrypoint for module scaffolding. The step-by-step flow is in /.system/skills/ssot/repo/scaffolding/new-module/SKILL.md. --- ## 1. Purpose & Scope **Purpose**: Create a new module directory with all required files (MANIFEST.yaml, AGENTS.md, standard skeleton) and register it in the modular system. **Scope**: - Creates module directory under `/modules//` - Generates required files (MANIFEST.yaml, AGENTS.md) - Optionally creates ABILITY.md, workdocs/ - Triggers derived registry regeneration **Out of scope**: - Business logic implementation - Flow graph modifications (handled separately) - Integration scenario creation --- ## 2. Inputs & Preconditions ### Required Inputs | Parameter | Type | Description | |-----------|------|-------------| | `module_id` | string | Unique identifier (snake_case recommended) | | `description` | string | One-line description of module purpose | ### Optional Inputs | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `module_type` | string | (none) | Architectural label (must exist in type_graph.yaml) | | `create_ability` | boolean | true | Create ABILITY.md | | `interfaces` | array | [] | Initial interface definitions | ### Preconditions 1. Phase 4 registry tooling is available (`scripts/devops/registry/`) 2. Module Runner automation is available (`scripts/modular/registry_build.py`) 3. `/modules/` directory exists 4. `module_id` does not already exist in `/modules/` --- ## 3. Step-by-Step Flow (AI + Human) See /.system/skills/ssot/repo/scaffolding/new-module/SKILL.md. --- ## 4. Tools & Scripts | Tool | Purpose | |------|---------| | `scripts/devops/scaffold/new_module.py` | Orchestrator script | | `scripts/modular/registry_build.py` | Regenerate derived registries | | `scripts/modular/flow_lint.py` | Validate flow graph consistency | --- ## 5. Outputs & Side Effects ### Files Created ``` modules// MANIFEST.yaml # Module metadata (required) AGENTS.md # AI strategy (required) ABILITY.md # Ability catalog (optional) workdocs/ # Scenario-local task state AGENTS.md src/ # Source code placeholder tests/ # Test files placeholder ``` ### Registries Updated - `modules/overview/instance_registry.yaml` (regenerated) - `modules/overview/flow_impl_index.yaml` (regenerated, if interfaces specified) --- ## 6. Safety & Rollback ### Safety Measures - `--dry-run` always available for preview - Human approval required before execution - Schema validation on MANIFEST.yaml ### Rollback Procedure If scaffold fails or needs reverting: 1. Delete the created module directory: ```bash rm -rf modules// ``` 2. Regenerate derived registries: ```bash python scripts/modular/registry_build.py ``` --- ## 7. Related Documents - `/.system/skills/ssot/repo/scaffolding/new-module/template/layout.md` - Module directory structure - `/.system/skills/ssot/repo/scaffolding/new-module/template/manifest_fields.md` - MANIFEST.yaml fields - `/.system/skills/ssot/repo/scaffolding/new-module/template/registration_flow.md` - Module registration flow - `/.system/skills/ssot/repo/architecture-core-mechanisms/module-workflow/SKILL.md` - Module development workflow - `/.system/skills/ssot/repo/architecture-core-mechanisms/modular-system/SKILL.md` - Modular system details