--- namespace: aiwg name: scaffold-extension platforms: [all] description: Create a new extension package inside an existing framework's extensions/ directory --- # Scaffold Extension Create a new extension package inside an existing framework's `extensions/` directory. ## Triggers Alternate expressions and non-obvious activations (primary phrases are matched automatically from the skill description): - "I need a new extension" → scaffold extension in specified framework - "create an extension package" → prompt for name and parent framework - "add Python support to sdlc-complete" → derive name=`python`, scaffold in sdlc-complete - "new language extension" → clarify name and framework, scaffold ## Trigger Patterns Reference | Pattern | Example | Action | |---------|---------|--------| | Named scaffold | "scaffold extension python --to sdlc-complete" | Scaffold directly | | Language extension | "add Go support to sdlc-complete" | Derive name=`go`, confirm | | Interactive | "scaffold extension --interactive --to sdlc-complete" | Guided design mode | | Target omitted | "scaffold extension typescript" | Ask which framework | ## Understanding Extensions Extensions are language- or ecosystem-specific capability packages nested inside a framework. They augment framework agents and rules with toolchain-specific knowledge. Examples: | Extension | Framework | Provides | |-----------|-----------|---------| | `python/` | `sdlc-complete` | Python testing patterns, type hint rules, pip/poetry guidance | | `javascript/` | `sdlc-complete` | npm/pnpm workflows, ESLint integration, Jest patterns | | `github/` | `sdlc-complete` | GitHub Actions, PR review workflows, release automation | | `terraform/` | `sdlc-complete` | IaC patterns, state management, plan review agents | Extensions differ from addons: - **Extensions**: Nested within a specific framework, language/ecosystem-scoped - **Addons**: Standalone, cross-cutting, installed alongside any framework Extensions cannot contain skills (skills require standalone functionality). They contain agents, rules, and templates scoped to their ecosystem. ## Process ### 1. Parse Arguments Extract from `$ARGUMENTS`: - `` — kebab-case extension name (required; often a language or ecosystem name) - `--to ` — parent framework directory name (required) - `--description ""` — short description (optional) - `--interactive` — enable guided design questions If either `` or `--to` is missing, ask before proceeding. ### 2. Validate Parent Framework Confirm the parent framework exists: ```bash ls agentic/code/frameworks// ``` Check if an `extensions/` directory exists; if not, it will be created. Check for name conflicts: ```bash ls agentic/code/frameworks//extensions/ 2>/dev/null ``` ### 3. Interactive Design (if --interactive) Ask before generating: 1. **Ecosystem**: What language, platform, or ecosystem does this extension target? 2. **Capabilities**: What ecosystem-specific capabilities does it add? (linting rules, test patterns, deployment agents) 3. **Agents**: What specialist agents should be scaffolded? (e.g., `python-test-engineer`, `go-module-auditor`) 4. **Rules**: What ecosystem-specific rules should be defined? (e.g., type safety, package management) 5. **Templates**: What ecosystem-specific document templates are needed? ### 4. Run Scaffolding ```bash aiwg scaffold-extension --to [--description "..."] ``` ### 5. Customize Generated Files **manifest.json** — The extension's registry entry: ```json { "name": "", "version": "1.0.0", "description": "", "parentFramework": "", "agents": [], "rules": [], "templates": [] } ``` **README.md** — Document the ecosystem targeted, capabilities provided, and activation conditions. ### 6. Add Ecosystem-Specific Components After scaffold: ```bash # Add ecosystem-specific agent aiwg add-agent -specialist --to /extensions/ # Note: --to path traversal not yet supported; create agent file directly # Create agent file # /extensions//agents/.md # Create rules # /extensions//rules/.md # Create templates # /extensions//templates/