[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C12AXGAPFRHEYKRZN3E12H":3,"skill-same:01M6C12AXGAPFRHEYKRZN3E12H":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":41,"linkOnly":42,"markdownContent":43,"markdownBody":44,"frontMatter":45,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M6C12AXGAPFRHEYKRZN3E12H","setup-generate","生成 setup 清单文件","Generate a `setup.manifest.yaml` file for a project using the `setup.aiwg.io\u002Fv1`","使用 `setup.aiwg.io\u002Fv1` 为项目生成 `setup.manifest.yaml` 文件。","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-generate\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSTR9G4A4GZ0VB2DFN9490","开发环境与工具链管理","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40],"setup","generate","setup generate","file","yaml","manifest","project","io","v1","for","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: setup-generate\nplatforms: [all]\ndescription: \"Generate a `setup.manifest.yaml` file for a project using the `setup.aiwg.io\u002Fv1`\"\n---\n\n# setup-generate\n\nGenerate a `setup.manifest.yaml` file for a project using the `setup.aiwg.io\u002Fv1` SetupManifest language.\n\nFor AIWG itself, reuse the published provider-orchestrated `setup.aiwg.yaml`\nrather than generating a replacement. It bootstraps a healthy CLI, then uses\n`aiwg setup --scope project`, `aiwg setup --review`, and `aiwg setup --apply`.\nThese commands save, review, and apply an interview plan; they do not change\nSetupManifest execution mode or make `setup-run` an interactive installer.\n\n## Trigger Phrases\n\n- \"generate a setup manifest for [project]\"\n- \"create installer for [project]\"\n- \"scaffold setup manifest\"\n- \"write a setup.manifest.yaml for [directory]\"\n- \"generate install workflow for [project]\"\n- \"generate dev installer for [project]\"\n\n## Parameters\n\n### project-dir (positional, optional)\nPath to the project root. Defaults to `.`.\n\n### --output (optional)\nManifest path to create. Default: `.\u002Fsetup.manifest.yaml`.\n\n### --name (optional)\nManifest `metadata.name`. Default: package name or project directory name.\n\n### --type (optional)\nInstall type: `user`, `developer`, or `ci`. Default: `developer`.\n\n### --platform (optional)\nTarget platform: `linux`, `macos`, `windows`, or `docker`.\n\n### --force (optional)\nOverwrite existing generated manifest\u002Fscript files.\n\n### --type (optional)\nInstall type to generate: `user`, `developer`, or `ci`.\nDefault: `user`.\n\n- `user` — production\u002Fend-user deployment (default, behavior unchanged from previous versions)\n- `developer` — local development environment standup with OS configuration\n- `ci` — headless pipeline setup\n\nWhen `--type developer`, output filename is `setup.dev.manifest.yaml`. When `--type user`, output is `setup.user.manifest.yaml` (or `setup.manifest.yaml` if no type is specified for backwards compatibility).\n\n### --interactive (optional)\nAsk clarifying questions before generating.\n\n## Execution Flow\n\n### Phase 1: Discovery\n\n1. Read the project root to understand structure:\n   - Check for `package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, `Makefile`, etc.\n   - Check for `README.md`, `INSTALL.md`, `docs\u002Finstall.md`\n   - Check for existing `setup.manifest.yaml`\n2. Parse local project cues when they are available; the CLI entrypoint emits\n   a conservative starter manifest and leaves richer project-specific authoring\n   to the agent skill.\n3. If `--interactive`, ask:\n   - What OSes must be supported?\n   - What are the hard prerequisites (git, node, python version)?\n   - Is there a config directory that needs to be created?\n   - Does the project chain sub-projects?\n\n#### Developer Install Discovery (when `--type developer`)\n\nAdditional discovery steps for developer manifests:\n\n1. Scan for dev-specific indicators: `.nvmrc`, `.tool-versions`, `mise.toml`, `pyproject.toml [dev]`, `Brewfile`, `.devcontainer\u002F`\n2. Detect Docker-in-dev usage patterns (bind mounts, live reload, `--watch` flags)\n3. If `--interactive` or key information is absent, ask mandatory interactive questions:\n   - \"What OS(es) do developers use? (linux\u002Fmacos\u002Fwindows)\"\n   - \"Is there a local domain for HTTPS development? (e.g., myapp.local)\"\n   - \"Do developers need GPU access for local dev? (yes\u002Fno)\"\n   - \"Is SSH key setup required as a project prerequisite? (yes\u002Fno)\"\n   - \"Which IDE(s) are standard? (vscode\u002Fjetbrains\u002Fnone)\"\n   - \"Any kernel\u002FOS parameters required? (inotify watches, vm.max_map_count, etc.)\"\n   - \"Does the project use a local certificate authority for HTTPS dev?\"\n\n### Phase 2: Assemble Manifest\n\nBuild the manifest YAML following this priority order:\n\n1. **metadata block** — include `install_type` matching `--type` flag (default: `developer`)\n2. **platform block** — from `--platform` or detected by project type\n3. **params block** — standard params: `INSTALL_DIR`, `BRANCH` (default: `main`); add `CONFIG_DIR` if a config step is needed\n4. **prerequisites block** — from project type (e.g., `node` for npm projects, `python3` for Python)\n5. **steps block** — construct from script templates:\n   - Always start with a `clone` or `verify-existing` detect step\n   - Add `install-deps-*` steps for each target platform\n   - Add `configure` step if config files are needed\n   - End with a `verify` step\n6. **recovery_procedures block** — always include a `full-reset` fallback\n\n#### Developer Manifest Assembly Rules (when `--type developer`)\n\nWhen assembling developer manifests, apply these additional rules:\n\n**os_config block** — emit entries based on detection:\n\n| Condition | Entry |\n|-----------|-------|\n| Linux + Docker in project | `docker-group` (requires_relogin: true) |\n| Linux + file watchers detected (webpack\u002Fjest\u002Fvite\u002Fnodemon) | `inotify-watches` |\n| Linux + Elasticsearch\u002FWeaviate\u002FOpenSearch detected | `vm-mapcount` |\n| macOS | `xcode-cli-tools` (interactive: true) |\n| HTTPS dev + local domain | mkcert install step (not os_config, but a script step) |\n| GPU dev | `nvidia-container-toolkit` os_config entry |\n\n**params** — emit with `interactive_required: true` for:\n- `LOCAL_DOMAIN` — when HTTPS dev or local domain detected\n- `SSH_EMAIL` — when SSH key setup is required\n- `GIT_USER_NAME`, `GIT_USER_EMAIL` — when git config step is included\n- `GIT_GPG_KEY_ID` — when GPG signing is requested\n- `IDE` — when IDE-specific extension installation is included\n\n**steps** — emit os-config steps for each os_config entry:\n```yaml\n- id: apply-docker-group\n  type: os-config\n  config_id: docker-group\n  depends_on: [install-docker]\n  platform: linux\n```\n\n**dev-specific prerequisites** — add as detected:\n- `nvm` or `mise` — when `.nvmrc` or `.tool-versions` found\n- `mkcert` — when HTTPS dev requested\n- `act` — when GitHub Actions local testing detected\n\n### Docker-based Project Detection\n\nWhen `docker-compose.yml` or `compose.yaml` is found during Phase 1 discovery, apply these additional behaviors:\n\n**Platform** (#676):\n- Include `macos` in the platform block alongside `linux` — Docker Desktop covers both.\n- Any GPU or nvidia steps must add `when: \"$(uname -s) = Linux\"` so they are skipped on macOS.\n- Update `install_hint` for docker prereqs to include macOS install links.\n\n**Prerequisites** (#672, #674):\n- Replace `command -v docker` with `docker version --format '{{.Server.Version}}' 2>\u002Fdev\u002Fnull` to catch both \"not installed\" and \"installed but no permission\" cases.\n- Expand the docker `install_hint` to mention `sudo usermod -aG docker $USER`.\n- When Docker images or ML models are present, add disk space prereq (≥20GB free):\n  ```yaml\n  - name: disk-space\n    detect: \"df --output=avail -BG \u002F | tail -1 | tr -d ' G'\"\n    version_min: \"20\"\n    install_hint: \"At least 20GB free disk space required for Docker images.\"\n  ```\n- When ML models are detected (Ollama, HuggingFace, etc.), add RAM prereq (≥8GB):\n  ```yaml\n  - name: ram\n    detect: \"awk '\u002FMemTotal\u002F {printf \\\"%.0f\\\", $2\u002F1024\u002F1024}' \u002Fproc\u002Fmeminfo\"\n    version_min: \"8\"\n    install_hint: \"At least 8GB RAM recommended. 16GB+ for GPU profiles.\"\n  ```\n\n**Params** (#671, #675):\n- When a `DOMAIN` or `ISSUER_URL` param is emitted, also emit a `PROTOCOL` param with a smart default:\n  ```yaml\n  - name: PROTOCOL\n    type: choice\n    choices: [http, https]\n    default: \"$(echo ${DOMAIN} | grep -qE '^(localhost|127\\\\.0\\\\.0\\\\.1)' && echo http || echo https)\"\n    description: \"Protocol for OAuth\u002FAPI URLs. Defaults to http for localhost.\"\n  ```\n  Then reference `${PROTOCOL}:\u002F\u002F${DOMAIN}` in configure.sh instead of hardcoding `https:\u002F\u002F`.\n- Default `DATA_DIR` to `${INSTALL_DIR}\u002Fdata` (project-local, user-writable) rather than any system path like `\u002Fvar\u002Flib\u002F\u003Cproject>`. If the project explicitly requires a system path, emit a `check-data-dir` step (see steps below).\n\n**Steps** (#673, #675, #677):\n- Emit a `check-ports` step before `deploy` that validates all ports declared in the compose file are free:\n  ```yaml\n  - id: check-ports\n    type: script\n    script: installer\u002Fscripts\u002Fcheck-ports.sh\n    depends_on: [configure]\n  ```\n- When the default `DATA_DIR` is a system path, emit a `check-data-dir` step before `configure`:\n  ```yaml\n  - id: check-data-dir\n    type: script\n    script: installer\u002Fscripts\u002Fcheck-data-dir.sh\n    depends_on: [clone]\n  ```\n- When Ollama is detected in the compose file or `.env` template, emit a `pull-models` step after `deploy`:\n  ```yaml\n  - id: pull-models\n    type: script\n    description: Pull Ollama models (may take several minutes)\n    script: installer\u002Fscripts\u002Fpull-models.sh\n    depends_on: [deploy]\n    verify: \"docker exec $(docker compose ps -q ollama) ollama list | grep -q ${OLLAMA_GEN_MODEL%%:*}\"\n  ```\n\n**Script templates used for Docker projects**:\n- `installer\u002Fscripts\u002Fcheck-ports.sh` — port availability check before deploy\n- `installer\u002Fscripts\u002Fpull-models.sh` — Ollama model pull after deploy (when applicable)\n\n### Phase 3: Script Assembly\n\nFor each script step:\n1. Copy the relevant template from `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fscripts\u002Ftemplates\u002F`\n2. For developer manifests, copy dev templates from `scripts\u002Ftemplates\u002Fdev\u002F`\n3. Place in `\u003Cproject>\u002Finstaller\u002Fscripts\u002F` (user install) or `\u003Cproject>\u002Finstaller\u002Fscripts\u002Fdev\u002F` (developer install)\n4. Customize placeholders (package lists, config paths, extension IDs, etc.)\n5. Record relative path in the manifest `script:` field\n\n### Phase 4: Output\n\nWrite the manifest to the appropriate path:\n- `installer\u002Fsetup.user.manifest.yaml` — user install (when `installer\u002F` dir exists)\n- `installer\u002Fsetup.dev.manifest.yaml` — developer install (when `installer\u002F` dir exists)\n- `setup.manifest.yaml` — backwards-compatible default (no `--type` flag, no `installer\u002F` dir)\n\nReport:\n```\nGenerated: setup.manifest.yaml\n  Install type:  developer\n  Platform:      linux\n  Steps:         setup\n  Scripts:       scripts\u002Fsetup.sh\n\nValidate with: aiwg setup-validate --manifest setup.manifest.yaml\nRun with:      aiwg setup-run --manifest setup.manifest.yaml --dry-run\n```\n\n## Output File Structure\n\nA full-suite project (both user and developer install) ships these files:\n\n```\ninstaller\u002F\n├── setup.user.manifest.yaml          # end-user deploy\n├── setup.dev.manifest.yaml           # developer standup\n├── docs\u002F\n│   ├── install-user-linux.md\n│   ├── install-user-macos.md\n│   ├── install-user-windows.md\n│   ├── install-dev-linux.md\n│   ├── install-dev-macos.md\n│   ├── install-dev-windows.md\n│   └── install-dev-wsl2.md\n└── scripts\u002F\n    ├── clone.sh\n    ├── configure.sh\n    ├── verify.sh\n    ├── dev\u002F\n    │   ├── configure-dev.sh\n    │   ├── install-mkcert.sh\n    │   ├── apply-docker-group.sh\n    │   ├── apply-inotify.sh\n    │   ├── apply-vm-mapcount.sh\n    │   ├── install-ide-extensions.sh\n    │   ├── setup-git-config.sh\n    │   ├── setup-ssh-key.sh\n    │   └── verify-dev.sh\n    └── user\u002F\n        ├── install-deps-ubuntu.sh\n        ├── install-deps-macos.sh\n        └── install-deps-windows.ps1\n```\n\n## Script-First Rule\n\nEvery step that can be scripted MUST be a `script` step. Only use `type: agentic` for:\n- Steps that require real-time environment inspection that cannot be expressed in bash\n- Recovery from unexpected failures where the script approach has been exhausted\n\n## Example Output (Developer Manifest)\n\n```yaml\napiVersion: setup.aiwg.io\u002Fv1\nkind: SetupManifest\nmetadata:\n  name: myapp-dev\n  version: 1.0.0\n  description: Developer environment setup for myapp\n  install_type: developer\n\nspec:\n  platforms:\n    - os: linux\n      distros: [ubuntu, debian, fedora]\n      arch: [x86_64, arm64]\n      shell: bash\n    - os: macos\n      arch: [x86_64, arm64]\n      shell: zsh\n\n  params:\n    - name: INSTALL_DIR\n      type: path\n      required: true\n      description: Directory to clone the project into\n    - name: LOCAL_DOMAIN\n      type: string\n      interactive_required: true\n      description: Local domain for HTTPS dev (e.g., myapp.local)\n    - name: SSH_EMAIL\n      type: string\n      interactive_required: true\n      description: Email address for SSH key generation\n    - name: IDE\n      type: choice\n      choices: [vscode, jetbrains, none]\n      interactive_required: true\n      description: IDE to install extensions for\n\n  prerequisites:\n    - name: git\n      detect: \"command -v git\"\n      version_min: \"2.30\"\n      install_hint: \"Install git: https:\u002F\u002Fgit-scm.com\"\n    - name: docker\n      detect: \"docker version --format '{{.Server.Version}}' 2>\u002Fdev\u002Fnull\"\n      install_hint: \"Install Docker: https:\u002F\u002Fdocs.docker.com\u002Fget-docker\u002F\"\n\n  os_config:\n    - id: docker-group\n      description: Add current user to docker group (avoids sudo for docker)\n      check: \"id -nG | grep -qw docker\"\n      apply: \"sudo usermod -aG docker ${USER}\"\n      requires_relogin: true\n      platforms: [linux]\n\n    - id: inotify-watches\n      description: Increase inotify watches for file watchers (webpack, jest, vite)\n      check: \"sysctl fs.inotify.max_user_watches | awk '{print $3}' | xargs -I{} test {} -ge 524288\"\n      apply: |\n        echo 'fs.inotify.max_user_watches=524288' | sudo tee -a \u002Fetc\u002Fsysctl.d\u002F99-dev.conf\n        sudo sysctl -p \u002Fetc\u002Fsysctl.d\u002F99-dev.conf\n      platforms: [linux]\n\n    - id: xcode-cli-tools\n      description: Xcode Command Line Tools (required for native compilation on macOS)\n      check: \"xcode-select -p 2>\u002Fdev\u002Fnull | grep -q CommandLineTools\"\n      apply: \"xcode-select --install\"\n      interactive: true\n      platforms: [macos]\n\n  steps:\n    - id: clone\n      type: script\n      script: installer\u002Fscripts\u002Fclone.sh\n      verify: \"test -d ${INSTALL_DIR}\u002F.git\"\n\n    - id: setup-git-config\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fsetup-git-config.sh\n      params: [GIT_USER_NAME, GIT_USER_EMAIL]\n      depends_on: [clone]\n\n    - id: setup-ssh-key\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fsetup-ssh-key.sh\n      params: [SSH_EMAIL]\n      depends_on: [clone]\n\n    - id: apply-docker-group\n      type: os-config\n      config_id: docker-group\n      platform: linux\n      depends_on: [clone]\n\n    - id: apply-inotify\n      type: os-config\n      config_id: inotify-watches\n      platform: linux\n      depends_on: [clone]\n\n    - id: apply-xcode-tools\n      type: os-config\n      config_id: xcode-cli-tools\n      platform: macos\n      depends_on: [clone]\n\n    - id: install-mkcert\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Finstall-mkcert.sh\n      params: [LOCAL_DOMAIN]\n      depends_on: [clone]\n\n    - id: configure-dev\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fconfigure-dev.sh\n      params: [INSTALL_DIR, LOCAL_DOMAIN]\n      depends_on: [install-mkcert]\n\n    - id: install-ide-extensions\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Finstall-ide-extensions.sh\n      params: [IDE]\n      depends_on: [clone]\n\n    - id: verify-dev\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fverify-dev.sh\n      params: [LOCAL_DOMAIN]\n      depends_on: [configure-dev, apply-docker-group, apply-inotify]\n\n  recovery:\n    - id: full-reset\n      steps:\n        - id: reset\n          type: script\n          script: installer\u002Fscripts\u002Freset.sh\n```\n\n## References\n\n- Schema: `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fschemas\u002Fv1\u002Fsetup-manifest.schema.json`\n- Templates (user): `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fscripts\u002Ftemplates\u002F`\n- Templates (dev): `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fscripts\u002Ftemplates\u002Fdev\u002F`\n- Run skill: `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-run\u002FSKILL.md`\n- Validate skill: `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-validate\u002FSKILL.md`\n","# setup-generate\n\nGenerate a `setup.manifest.yaml` file for a project using the `setup.aiwg.io\u002Fv1` SetupManifest language.\n\nFor AIWG itself, reuse the published provider-orchestrated `setup.aiwg.yaml`\nrather than generating a replacement. It bootstraps a healthy CLI, then uses\n`aiwg setup --scope project`, `aiwg setup --review`, and `aiwg setup --apply`.\nThese commands save, review, and apply an interview plan; they do not change\nSetupManifest execution mode or make `setup-run` an interactive installer.\n\n## Trigger Phrases\n\n- \"generate a setup manifest for [project]\"\n- \"create installer for [project]\"\n- \"scaffold setup manifest\"\n- \"write a setup.manifest.yaml for [directory]\"\n- \"generate install workflow for [project]\"\n- \"generate dev installer for [project]\"\n\n## Parameters\n\n### project-dir (positional, optional)\nPath to the project root. Defaults to `.`.\n\n### --output (optional)\nManifest path to create. Default: `.\u002Fsetup.manifest.yaml`.\n\n### --name (optional)\nManifest `metadata.name`. Default: package name or project directory name.\n\n### --type (optional)\nInstall type: `user`, `developer`, or `ci`. Default: `developer`.\n\n### --platform (optional)\nTarget platform: `linux`, `macos`, `windows`, or `docker`.\n\n### --force (optional)\nOverwrite existing generated manifest\u002Fscript files.\n\n### --type (optional)\nInstall type to generate: `user`, `developer`, or `ci`.\nDefault: `user`.\n\n- `user` — production\u002Fend-user deployment (default, behavior unchanged from previous versions)\n- `developer` — local development environment standup with OS configuration\n- `ci` — headless pipeline setup\n\nWhen `--type developer`, output filename is `setup.dev.manifest.yaml`. When `--type user`, output is `setup.user.manifest.yaml` (or `setup.manifest.yaml` if no type is specified for backwards compatibility).\n\n### --interactive (optional)\nAsk clarifying questions before generating.\n\n## Execution Flow\n\n### Phase 1: Discovery\n\n1. Read the project root to understand structure:\n   - Check for `package.json`, `requirements.txt`, `Cargo.toml`, `go.mod`, `Makefile`, etc.\n   - Check for `README.md`, `INSTALL.md`, `docs\u002Finstall.md`\n   - Check for existing `setup.manifest.yaml`\n2. Parse local project cues when they are available; the CLI entrypoint emits\n   a conservative starter manifest and leaves richer project-specific authoring\n   to the agent skill.\n3. If `--interactive`, ask:\n   - What OSes must be supported?\n   - What are the hard prerequisites (git, node, python version)?\n   - Is there a config directory that needs to be created?\n   - Does the project chain sub-projects?\n\n#### Developer Install Discovery (when `--type developer`)\n\nAdditional discovery steps for developer manifests:\n\n1. Scan for dev-specific indicators: `.nvmrc`, `.tool-versions`, `mise.toml`, `pyproject.toml [dev]`, `Brewfile`, `.devcontainer\u002F`\n2. Detect Docker-in-dev usage patterns (bind mounts, live reload, `--watch` flags)\n3. If `--interactive` or key information is absent, ask mandatory interactive questions:\n   - \"What OS(es) do developers use? (linux\u002Fmacos\u002Fwindows)\"\n   - \"Is there a local domain for HTTPS development? (e.g., myapp.local)\"\n   - \"Do developers need GPU access for local dev? (yes\u002Fno)\"\n   - \"Is SSH key setup required as a project prerequisite? (yes\u002Fno)\"\n   - \"Which IDE(s) are standard? (vscode\u002Fjetbrains\u002Fnone)\"\n   - \"Any kernel\u002FOS parameters required? (inotify watches, vm.max_map_count, etc.)\"\n   - \"Does the project use a local certificate authority for HTTPS dev?\"\n\n### Phase 2: Assemble Manifest\n\nBuild the manifest YAML following this priority order:\n\n1. **metadata block** — include `install_type` matching `--type` flag (default: `developer`)\n2. **platform block** — from `--platform` or detected by project type\n3. **params block** — standard params: `INSTALL_DIR`, `BRANCH` (default: `main`); add `CONFIG_DIR` if a config step is needed\n4. **prerequisites block** — from project type (e.g., `node` for npm projects, `python3` for Python)\n5. **steps block** — construct from script templates:\n   - Always start with a `clone` or `verify-existing` detect step\n   - Add `install-deps-*` steps for each target platform\n   - Add `configure` step if config files are needed\n   - End with a `verify` step\n6. **recovery_procedures block** — always include a `full-reset` fallback\n\n#### Developer Manifest Assembly Rules (when `--type developer`)\n\nWhen assembling developer manifests, apply these additional rules:\n\n**os_config block** — emit entries based on detection:\n\n| Condition | Entry |\n|-----------|-------|\n| Linux + Docker in project | `docker-group` (requires_relogin: true) |\n| Linux + file watchers detected (webpack\u002Fjest\u002Fvite\u002Fnodemon) | `inotify-watches` |\n| Linux + Elasticsearch\u002FWeaviate\u002FOpenSearch detected | `vm-mapcount` |\n| macOS | `xcode-cli-tools` (interactive: true) |\n| HTTPS dev + local domain | mkcert install step (not os_config, but a script step) |\n| GPU dev | `nvidia-container-toolkit` os_config entry |\n\n**params** — emit with `interactive_required: true` for:\n- `LOCAL_DOMAIN` — when HTTPS dev or local domain detected\n- `SSH_EMAIL` — when SSH key setup is required\n- `GIT_USER_NAME`, `GIT_USER_EMAIL` — when git config step is included\n- `GIT_GPG_KEY_ID` — when GPG signing is requested\n- `IDE` — when IDE-specific extension installation is included\n\n**steps** — emit os-config steps for each os_config entry:\n```yaml\n- id: apply-docker-group\n  type: os-config\n  config_id: docker-group\n  depends_on: [install-docker]\n  platform: linux\n```\n\n**dev-specific prerequisites** — add as detected:\n- `nvm` or `mise` — when `.nvmrc` or `.tool-versions` found\n- `mkcert` — when HTTPS dev requested\n- `act` — when GitHub Actions local testing detected\n\n### Docker-based Project Detection\n\nWhen `docker-compose.yml` or `compose.yaml` is found during Phase 1 discovery, apply these additional behaviors:\n\n**Platform** (#676):\n- Include `macos` in the platform block alongside `linux` — Docker Desktop covers both.\n- Any GPU or nvidia steps must add `when: \"$(uname -s) = Linux\"` so they are skipped on macOS.\n- Update `install_hint` for docker prereqs to include macOS install links.\n\n**Prerequisites** (#672, #674):\n- Replace `command -v docker` with `docker version --format '{{.Server.Version}}' 2>\u002Fdev\u002Fnull` to catch both \"not installed\" and \"installed but no permission\" cases.\n- Expand the docker `install_hint` to mention `sudo usermod -aG docker $USER`.\n- When Docker images or ML models are present, add disk space prereq (≥20GB free):\n  ```yaml\n  - name: disk-space\n    detect: \"df --output=avail -BG \u002F | tail -1 | tr -d ' G'\"\n    version_min: \"20\"\n    install_hint: \"At least 20GB free disk space required for Docker images.\"\n  ```\n- When ML models are detected (Ollama, HuggingFace, etc.), add RAM prereq (≥8GB):\n  ```yaml\n  - name: ram\n    detect: \"awk '\u002FMemTotal\u002F {printf \\\"%.0f\\\", $2\u002F1024\u002F1024}' \u002Fproc\u002Fmeminfo\"\n    version_min: \"8\"\n    install_hint: \"At least 8GB RAM recommended. 16GB+ for GPU profiles.\"\n  ```\n\n**Params** (#671, #675):\n- When a `DOMAIN` or `ISSUER_URL` param is emitted, also emit a `PROTOCOL` param with a smart default:\n  ```yaml\n  - name: PROTOCOL\n    type: choice\n    choices: [http, https]\n    default: \"$(echo ${DOMAIN} | grep -qE '^(localhost|127\\\\.0\\\\.0\\\\.1)' && echo http || echo https)\"\n    description: \"Protocol for OAuth\u002FAPI URLs. Defaults to http for localhost.\"\n  ```\n  Then reference `${PROTOCOL}:\u002F\u002F${DOMAIN}` in configure.sh instead of hardcoding `https:\u002F\u002F`.\n- Default `DATA_DIR` to `${INSTALL_DIR}\u002Fdata` (project-local, user-writable) rather than any system path like `\u002Fvar\u002Flib\u002F\u003Cproject>`. If the project explicitly requires a system path, emit a `check-data-dir` step (see steps below).\n\n**Steps** (#673, #675, #677):\n- Emit a `check-ports` step before `deploy` that validates all ports declared in the compose file are free:\n  ```yaml\n  - id: check-ports\n    type: script\n    script: installer\u002Fscripts\u002Fcheck-ports.sh\n    depends_on: [configure]\n  ```\n- When the default `DATA_DIR` is a system path, emit a `check-data-dir` step before `configure`:\n  ```yaml\n  - id: check-data-dir\n    type: script\n    script: installer\u002Fscripts\u002Fcheck-data-dir.sh\n    depends_on: [clone]\n  ```\n- When Ollama is detected in the compose file or `.env` template, emit a `pull-models` step after `deploy`:\n  ```yaml\n  - id: pull-models\n    type: script\n    description: Pull Ollama models (may take several minutes)\n    script: installer\u002Fscripts\u002Fpull-models.sh\n    depends_on: [deploy]\n    verify: \"docker exec $(docker compose ps -q ollama) ollama list | grep -q ${OLLAMA_GEN_MODEL%%:*}\"\n  ```\n\n**Script templates used for Docker projects**:\n- `installer\u002Fscripts\u002Fcheck-ports.sh` — port availability check before deploy\n- `installer\u002Fscripts\u002Fpull-models.sh` — Ollama model pull after deploy (when applicable)\n\n### Phase 3: Script Assembly\n\nFor each script step:\n1. Copy the relevant template from `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fscripts\u002Ftemplates\u002F`\n2. For developer manifests, copy dev templates from `scripts\u002Ftemplates\u002Fdev\u002F`\n3. Place in `\u003Cproject>\u002Finstaller\u002Fscripts\u002F` (user install) or `\u003Cproject>\u002Finstaller\u002Fscripts\u002Fdev\u002F` (developer install)\n4. Customize placeholders (package lists, config paths, extension IDs, etc.)\n5. Record relative path in the manifest `script:` field\n\n### Phase 4: Output\n\nWrite the manifest to the appropriate path:\n- `installer\u002Fsetup.user.manifest.yaml` — user install (when `installer\u002F` dir exists)\n- `installer\u002Fsetup.dev.manifest.yaml` — developer install (when `installer\u002F` dir exists)\n- `setup.manifest.yaml` — backwards-compatible default (no `--type` flag, no `installer\u002F` dir)\n\nReport:\n```\nGenerated: setup.manifest.yaml\n  Install type:  developer\n  Platform:      linux\n  Steps:         setup\n  Scripts:       scripts\u002Fsetup.sh\n\nValidate with: aiwg setup-validate --manifest setup.manifest.yaml\nRun with:      aiwg setup-run --manifest setup.manifest.yaml --dry-run\n```\n\n## Output File Structure\n\nA full-suite project (both user and developer install) ships these files:\n\n```\ninstaller\u002F\n├── setup.user.manifest.yaml          # end-user deploy\n├── setup.dev.manifest.yaml           # developer standup\n├── docs\u002F\n│   ├── install-user-linux.md\n│   ├── install-user-macos.md\n│   ├── install-user-windows.md\n│   ├── install-dev-linux.md\n│   ├── install-dev-macos.md\n│   ├── install-dev-windows.md\n│   └── install-dev-wsl2.md\n└── scripts\u002F\n    ├── clone.sh\n    ├── configure.sh\n    ├── verify.sh\n    ├── dev\u002F\n    │   ├── configure-dev.sh\n    │   ├── install-mkcert.sh\n    │   ├── apply-docker-group.sh\n    │   ├── apply-inotify.sh\n    │   ├── apply-vm-mapcount.sh\n    │   ├── install-ide-extensions.sh\n    │   ├── setup-git-config.sh\n    │   ├── setup-ssh-key.sh\n    │   └── verify-dev.sh\n    └── user\u002F\n        ├── install-deps-ubuntu.sh\n        ├── install-deps-macos.sh\n        └── install-deps-windows.ps1\n```\n\n## Script-First Rule\n\nEvery step that can be scripted MUST be a `script` step. Only use `type: agentic` for:\n- Steps that require real-time environment inspection that cannot be expressed in bash\n- Recovery from unexpected failures where the script approach has been exhausted\n\n## Example Output (Developer Manifest)\n\n```yaml\napiVersion: setup.aiwg.io\u002Fv1\nkind: SetupManifest\nmetadata:\n  name: myapp-dev\n  version: 1.0.0\n  description: Developer environment setup for myapp\n  install_type: developer\n\nspec:\n  platforms:\n    - os: linux\n      distros: [ubuntu, debian, fedora]\n      arch: [x86_64, arm64]\n      shell: bash\n    - os: macos\n      arch: [x86_64, arm64]\n      shell: zsh\n\n  params:\n    - name: INSTALL_DIR\n      type: path\n      required: true\n      description: Directory to clone the project into\n    - name: LOCAL_DOMAIN\n      type: string\n      interactive_required: true\n      description: Local domain for HTTPS dev (e.g., myapp.local)\n    - name: SSH_EMAIL\n      type: string\n      interactive_required: true\n      description: Email address for SSH key generation\n    - name: IDE\n      type: choice\n      choices: [vscode, jetbrains, none]\n      interactive_required: true\n      description: IDE to install extensions for\n\n  prerequisites:\n    - name: git\n      detect: \"command -v git\"\n      version_min: \"2.30\"\n      install_hint: \"Install git: https:\u002F\u002Fgit-scm.com\"\n    - name: docker\n      detect: \"docker version --format '{{.Server.Version}}' 2>\u002Fdev\u002Fnull\"\n      install_hint: \"Install Docker: https:\u002F\u002Fdocs.docker.com\u002Fget-docker\u002F\"\n\n  os_config:\n    - id: docker-group\n      description: Add current user to docker group (avoids sudo for docker)\n      check: \"id -nG | grep -qw docker\"\n      apply: \"sudo usermod -aG docker ${USER}\"\n      requires_relogin: true\n      platforms: [linux]\n\n    - id: inotify-watches\n      description: Increase inotify watches for file watchers (webpack, jest, vite)\n      check: \"sysctl fs.inotify.max_user_watches | awk '{print $3}' | xargs -I{} test {} -ge 524288\"\n      apply: |\n        echo 'fs.inotify.max_user_watches=524288' | sudo tee -a \u002Fetc\u002Fsysctl.d\u002F99-dev.conf\n        sudo sysctl -p \u002Fetc\u002Fsysctl.d\u002F99-dev.conf\n      platforms: [linux]\n\n    - id: xcode-cli-tools\n      description: Xcode Command Line Tools (required for native compilation on macOS)\n      check: \"xcode-select -p 2>\u002Fdev\u002Fnull | grep -q CommandLineTools\"\n      apply: \"xcode-select --install\"\n      interactive: true\n      platforms: [macos]\n\n  steps:\n    - id: clone\n      type: script\n      script: installer\u002Fscripts\u002Fclone.sh\n      verify: \"test -d ${INSTALL_DIR}\u002F.git\"\n\n    - id: setup-git-config\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fsetup-git-config.sh\n      params: [GIT_USER_NAME, GIT_USER_EMAIL]\n      depends_on: [clone]\n\n    - id: setup-ssh-key\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fsetup-ssh-key.sh\n      params: [SSH_EMAIL]\n      depends_on: [clone]\n\n    - id: apply-docker-group\n      type: os-config\n      config_id: docker-group\n      platform: linux\n      depends_on: [clone]\n\n    - id: apply-inotify\n      type: os-config\n      config_id: inotify-watches\n      platform: linux\n      depends_on: [clone]\n\n    - id: apply-xcode-tools\n      type: os-config\n      config_id: xcode-cli-tools\n      platform: macos\n      depends_on: [clone]\n\n    - id: install-mkcert\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Finstall-mkcert.sh\n      params: [LOCAL_DOMAIN]\n      depends_on: [clone]\n\n    - id: configure-dev\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fconfigure-dev.sh\n      params: [INSTALL_DIR, LOCAL_DOMAIN]\n      depends_on: [install-mkcert]\n\n    - id: install-ide-extensions\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Finstall-ide-extensions.sh\n      params: [IDE]\n      depends_on: [clone]\n\n    - id: verify-dev\n      type: script\n      script: installer\u002Fscripts\u002Fdev\u002Fverify-dev.sh\n      params: [LOCAL_DOMAIN]\n      depends_on: [configure-dev, apply-docker-group, apply-inotify]\n\n  recovery:\n    - id: full-reset\n      steps:\n        - id: reset\n          type: script\n          script: installer\u002Fscripts\u002Freset.sh\n```\n\n## References\n\n- Schema: `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fschemas\u002Fv1\u002Fsetup-manifest.schema.json`\n- Templates (user): `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fscripts\u002Ftemplates\u002F`\n- Templates (dev): `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fscripts\u002Ftemplates\u002Fdev\u002F`\n- Run skill: `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-run\u002FSKILL.md`\n- Validate skill: `agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-validate\u002FSKILL.md`\n",{"name":5,"namespace":46,"platforms":47,"description":7},"aiwg",[48],"all","main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-generate",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":9,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add jmagly\u002Faiwg --skill setup-generate",{"tool":65,"command":66},"bunx","bunx skills add jmagly\u002Faiwg --skill setup-generate",{"tool":68,"command":69},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill setup-generate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Fagentic-installer\u002Fskills\u002Fsetup-generate\u002FSKILL.md",true,[],[74,82,87,114,134,139],{"skillNo":75,"name":76,"nameZh":17,"description":77,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":81},"01M78KW7PZJ9YQZQMW84SN2YD4","plugin-search","Search marketplaces for plugins using configured local manifests and directory caches; rank matching plugins by observed installs, review tier and cache dates without installing or fetching anything","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Futils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":83,"name":76,"nameZh":17,"description":77,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":81},"01M78KSEZS9ZNNFESY9ANW22S0","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Faddons\u002Faiwg-utils\u002Fskills\u002Fplugin-search\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":17,"description":90,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":41},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],"hardening","host","host hardening","verification","secrets","read","request","remediation","recommendations","audit","plan","port","bind","Bash","access","only","retention","re","never","firewall",{"skillNo":115,"name":116,"nameZh":17,"description":117,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":41},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[121,122,123,124,125,126,99,127,105,112,107,128,95,129,109,130,131,113,132,133],"analysis","exposure analysis","collection","reconstruction","operator","write","credentials","unknown","internet","local","scope","ports","ufw",{"skillNo":135,"name":89,"nameZh":17,"description":90,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":41},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[],[94,95,96,111,112,113,106,110,102,98,99,100,101,103,104,105,97,107,108,109],{"skillNo":140,"name":116,"nameZh":17,"description":117,"descriptionZh":17,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":41},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[],[121,122,133,132,125,131,130,109,124,126,99,127,105,123,107,128,95,113,112,129]]