Skip to content

forcedotcom/sf-skills / plugins/builder/service-itsm/skills/service-itsm-agentic-setup-employee-agent-configure

service-itsm-agentic-setup-employee-agent-configure

Unverified

Create and activate an IT Service Employee agent as a Next-Gen Authoring (NGA) native agent from an ITSM Employee agent template's Agent Script, via the Salesforce CLI (sf): read the template, check idempotency, create the NGA bundle then publish and activate, verify live. Defaults to the broad IT Service Employee template; when the user names a specialized Employee template (Password Manager Assistance, Certificate Management, Onboarding, Hardware Request, and ~47 others catalogued in references/specialized-templates.md — all under the `svc_emp_intelligence__` namespace), pins that one instead. Idempotent per developer name. TRIGGER when the user asks to create/set up/provision/activate the Employee agent, the IT Service Employee agent, or a specialized Employee agent (password manager, certificate, onboarding, hardware request, etc.). DO NOT TRIGGER: prerequisite checks (service-itsm-agentic-setup-agentforce-studio-validate), CMDB CRUD, Fulfiller setup (service-itsm-agentic-setup-fulfiller-agent-configure).

FileKindSize
SKILL.mdskill md29.4 KB
references/cli-invocation.mdmarkdown22.4 KB
references/error-taxonomy.mdmarkdown4.1 KB
references/reactivation.mdmarkdown4.2 KB
references/report-format.mdmarkdown4.9 KB
references/specialized-templates.mdmarkdown10.5 KB
references/workflow-detail.mdmarkdown18.2 KB
scripts/build-create-body.mjsexecutablescript4.7 KB
scripts/classify-agent-existence.mjsexecutablescript13.5 KB
scripts/classify-preflight.mjsexecutablescript11.4 KB
scripts/create-scratch-dir.mjsexecutablescript2.3 KB
scripts/render-report.mjsexecutablescript12.2 KB

references/report-format.md

View on GitHub
# Report Format — Employee Agent Create & Activate

The report layout is generated deterministically by `scripts/render-report.mjs` — the single source of report text for both the chat-turn response and the harness's `${outputDir}/report.md` file, so the two never diverge. Never hand-compose the layout, field placement, stage rows, or next-step wording in prose (authoring standard A9); always shell out to the helper.

## Rendered shape

The helper reads a phase-state JSON and emits a report in this exact shape:

```text
# Employee Agent — Create & Activate

IT Service Employee Agent Creation (via service-itsm-agentic-setup-employee-agent-configure)

Org:      <org-alias> (API v67.0)
Template: <resolvedMasterLabel> (id=<resolvedId>) — <broad umbrella|specialized>
Source:   <resolvedId> Agent Script
Agent:    <developerName> ("<label>") — NGA-native bundle

Stage 2 — install & activate the agent from its template:

| Stage | Status |
| --- | --- |
| Preflight | Studio hasAccess=<true/false/cannot-confirm>; template agentScript present=<yes/no>; verdict=<READY/NOT-READY/CANNOT-CONFIRM> |
| Enumerate | target agent exists before write=<yes/no>; latest version status=<Active/Inactive/n/a>; verdict=<exists:...> |
| Confirm-to-write | user-confirmed=<true/false/pending> |
| Create bundle | <succeeded (created) / ALREADY-CREATED / skipped (reactivation path) / pending confirmation / FAILED> |
| Publish | <succeeded / skipped / pending confirmation / FAILED> |
| Activate | <succeeded (created) / succeeded (reactivated existing) / skipped / pending confirmation / FAILED> |
| Verify | <BotDefinition present: yes/no; latest version Active: yes/no / skipped> |

Verdict: CREATED | ALREADY-CREATED | ACTIVATED | PENDING CONFIRMATION | DECLINED | FAILED
Reason:  <plain-language explanation naming the atomicity constraint, the idempotency decision, and any decline/skip reasoning — the caller populates this before invoking the helper, so it can be as rubric-facing as the situation warrants without repeating raw API calls>

Next steps:
  - <helper-emitted next-step line for the emitted verdict>
```

## Report-state JSON schema (input to `render-report.mjs`)

The caller writes `${SCRATCH_DIR}/report-state.json` and passes it as the first arg:

```json
{
  "org": "<alias>",
  "template": {"masterLabel": "...", "id": "...", "kind": "broad umbrella"|"specialized"},
  "developerName": "...",
  "label": "...",
  "preflight": {"studioHasAccess": true|false|"cannot-confirm", "templateAgentScriptPresent": true|false},
  "enumerate": {"existsBeforeWrite": true|false, "latestVersionStatus": "Active"|"Inactive"|"n/a"},
  "confirmToWrite": "true"|"false"|"pending",
  "verdict": "CREATED"|"ALREADY-CREATED"|"ACTIVATED"|"PENDING CONFIRMATION"|"DECLINED"|"FAILED",
  "reason": "..."
}
```

The helper enforces a validated verdict set and picks the `Next steps` line from the verdict, so the file never drifts from that shape.

**No internal record IDs in the report.** The stage rows carry status only — the bundle version `id`, `publishedBotId`/`BotDefinition`, and `BotVersion` are captured solely to drive the publish/activate/verify calls and are meaningless to an admin, so they are never displayed. The helper renders status-only rows and defensively scrubs any ID that a caller passes inside a stage-status string, so a report can never leak one regardless of the phase-state input. Do not add IDs back in turn-side narration either (never "Bundle created (version id …)" / "Published (BotDefinition …)").

## Checkpoint writes (harness / non-interactive runs)

When `${outputDir}` is provided (via the harness's generated-file location directive), write the helper output to `${outputDir}/report.md` at three checkpoints so it always exists even when a run parks at a confirmation gate:

1. **After Phase 2** — render with `verdict:"PENDING CONFIRMATION"` (create path) or the applicable ALREADY-CREATED / needsActivation state.
2. **After Phase 6 (or Phase 2b activation)** — re-render with the create-succeeded (or reactivation-succeeded) state; leave `verify` as `pending`.
3. **After Phase 8** — re-render with the final verdict (CREATED / ALREADY-CREATED / ACTIVATED / DECLINED / FAILED).

Each write overwrites the same file, so the last state on disk is always the most complete. The helper produces a ~30-line report — do NOT append extra sections (raw HTTP commands, full JSON bodies, per-phase narratives, remediation walkthroughs, session notes) to the report file; those belong in the assistant's turn-side response only.

## Interactive runs

Skip these writes when running interactively for a user in a chat surface — write only when `${outputDir}` was passed as an explicit destination. In chat, the assistant may add turn-side narrative context above or below the helper output (raw command traces, error diagnostics, remediation walkthroughs) — the *report* is what the helper emits, the *turn* can be as rich as the situation warrants.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexUnverifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall