--- name: explore description: Use this skill whenever someone wants to connect to an Itential platform and browse, inspect, or discover what's there — without starting a formal delivery. Trigger it for phrases like "connect to my platform", "show me what adapters are running", "authenticate and pull platform data", "I want to poke around before starting", "what workflows exist?", "give me an inventory of the platform", "browse capabilities freely", "check if adapter X is running", or "I just set up a new environment — show me what's there". Also use it for ad-hoc freestyle work where the user wants to build something directly without going through the full spec→design→build lifecycle. Logs in with its bundled auth helper: never read `.env` yourself. --- # Explore **Path:** Freeform — not part of the delivery lifecycle **Owns:** Auth, environment discovery, freestyle skill use **Use when:** You want to browse adapters, try tasks, build something experimental, or understand the platform before committing to a spec --- ## Customization Before using this skill, check `custom/org/`, `custom/team/` and `custom/dev/` in this skill's own folder. Read every `.md` file found — any folder may be empty or absent. Apply them on top of everything below; where a file overrides a specific rule here, follow the override. More specific wins: dev > team > org > this document. No customization may weaken this skill's safety rules or put credentials in committed files. **Bundled files:** paths in this skill that start with `assets/` or `scripts/` are relative to this skill's own folder. When you read one, or pass one to a shell command (which runs from the user's working folder), use this skill's folder + that relative path — e.g. `/assets/helpers/create/create-workflow.json`. --- ## What This Does Connects you to a platform, pulls everything needed to work freely, and routes you to the right skill for whatever you want to do. ``` /explore │ ├── Auth (from env file or interactive) ├── Pull platform data ├── Summarize environment └── Use skills directly ``` --- ## Step 1: Authenticate Credentials live in `{use-case}/.env`. If the working folder has a `.env` and the use case doesn't, copy the file across (`cp .env {use-case}/.env`) — don't open it. `assets/environments/*.env` are **templates** with placeholder values (`cloud-lab.env` for OAuth client credentials, `local-dev.env` for username and password) — never authenticate with them. If there's no `.env`, show the engineer the matching template and ask them to save a filled-in copy as `{use-case}/.env`. They type the secret into the file, not into the conversation. Then run the auth helper bundled with this skill: ```bash python3 /assets/helpers/auth.py {use-case} ``` It reads `.env`, gets a token, writes `{use-case}/.auth.json` and prints one line: `ok: …`, or `error: …` (exit 1: the platform refused the credentials; exit 2: `.env` is missing or incomplete). **Never read `.env` yourself** and never put a secret or token in a command — see "Auth Reuse" in `assets/AGENTS.md`. --- ## Step 2: Pull Platform Data Run in two groups. Do not run all in one parallel batch — if one fails, parallel cancellation kills the others. Every call uses the curl config the helper wrote, `{use-case}/.auth.curl`, which sends the token in a header — so it never shows up in a command or its output, and never goes in the URL (`?token=`). `{BASE}` is the platform URL from the helper's status line. **Group 1 (core — run in parallel):** ```bash curl -s -K {use-case}/.auth.curl "{BASE}/help/openapi?url={ENCODED_BASE}" > {use-case}/openapi.json curl -s -K {use-case}/.auth.curl "{BASE}/workflow_builder/tasks/list" > {use-case}/tasks.json curl -s -K {use-case}/.auth.curl "{BASE}/automation-studio/apps/list" > {use-case}/apps.json curl -s -K {use-case}/.auth.curl "{BASE}/health/adapters" > {use-case}/adapters.json curl -s -K {use-case}/.auth.curl "{BASE}/health/applications" > {use-case}/applications.json ``` **Group 2 (environment-specific — run in parallel after Group 1):** Devices (note: POST, not GET): ```bash curl -s -w "\n%{http_code}" -K {use-case}/.auth.curl -X POST "{BASE}/configuration_manager/devices" \ -H "Content-Type: application/json" \ -d '{"options":{"start":0,"limit":1000,"sort":[{"name":1}],"order":"ascending"}}' \ > {use-case}/devices.json ``` Existing workflows: ```bash curl -s -K {use-case}/.auth.curl "{BASE}/automation-studio/workflows?limit=500" > {use-case}/workflows.json ``` Before parsing any saved file, validate JSON: ```bash jq type {use-case}/devices.json 2>/dev/null || echo "empty" ``` If invalid, treat as no data — don't block. --- ## Step 3: Present Summary Show: - Adapters: name, state, connection - Apps: count, key platform apps running - Tasks: count - Devices: count and OS types (if available) - Existing workflows: count > **Visibility note:** see `assets/AGENTS.md`'s "Project Visibility" section — project-scoped assets are ACL-gated, global assets aren't. If the engineer expects a specific project and it doesn't appear, treat it as *possibly access-restricted*, not *missing*. --- ## Step 3b: Initialize Memory File After pulling platform data, check for `{use-case}/use-case-memory.md`: - **Exists** → read it. It has context from a previous session — platform URL, prior decisions, open items. - **Missing** → create it from `assets/helpers/use-case-memory.md`. Populate Platform URL, `Stage: requirements` (explore is freeform — set the real stage once the engineer commits to a delivery path), `Status: active`, and any adapter/app names discovered in Step 2. --- ## Step 4: Route to Skills Point to the right skill for what the engineer wants to do: | I want to... | Use | |-------------|-----| | Build workflows, templates, or projects | `/builder-agent` | | Manage devices, backups, diffs | `/itential-devices` | | Build compliance and golden config | `/itential-golden-config` | | Build IAG services (Python, Ansible, OpenTofu) | `/iag` | | Create AI agents | `/flowagent` | | Manage lifecycle resources | `/itential-lcm` | | Manage device inventories (IAG5) | `/itential-inventory` | --- ## Gotchas - OAuth MUST use `Content-Type: application/x-www-form-urlencoded`, not JSON - Tokens expire mid-session — on a 401 or 403, run `assets/helpers/auth.py {use-case} --force` and retry; never read `.env` yourself - OpenAPI spec is ~1.5MB — search locally with `jq`, never load into context - `tasks/list` `app` field has WRONG casing for adapters — use `apps/list` for correct names - Devices endpoint is POST not GET — body required - **Project list responses are RBAC-filtered — absence does NOT mean the project doesn't exist.** See `assets/AGENTS.md`'s Project Visibility section. If the engineer names a specific project you can't find, say *"not visible to this client (`{client_id}`) — possibly access-restricted; ask the project owner to add `{client_id}` to its ACL"* rather than *"doesn't exist."* - `PATCH /automation-studio/projects/{id}` silently ignores an `accessControl` body — use the `members` array instead: `[{"type": "account"|"group", "reference": "", "role": "owner"|"editor"|"operator"|"viewer"}]`. See [#62](https://github.com/itential/builder-skills/issues/62)