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

scripts/create-scratch-dir.mjs

View on GitHub
#!/usr/bin/env node
// Deterministic Phase-0 scratch-directory creator for the Employee-agent
// create/activate flow.
//
// Phase-0 path selection + `mkdtemp` behavior are deterministic and must not
// live in workflow prose (authoring standard A9).
//
// The scratch dir MUST stay OUTSIDE the harness's scored `${outputDir}` tree.
// Several phases capture raw `sf api request rest` stdout, and that command is
// in beta — it prints beta/update/plugin diagnostics to STDERR. If an agent
// captures combined output (`2>&1`) instead of the documented `2>…err` split,
// that stderr preamble is merged into the captured file; a raw capture rooted
// under `${outputDir}` would then land in the eval's scored artifact set and
// fail the `core:json-valid` assertion even though the response body itself is
// well-formed JSON. So the scratch dir roots under `${TMPDIR}` (private,
// user-scoped), then `/tmp`, and only as an ultimate fallback (both temp bases
// unwritable) under the harness `${outputDir}`. `mkdtempSync` creates the run
// dir mode 0700 (owner-only) with a random suffix, so the world-writable `/tmp`
// parent is not a concern. Only the durable `${outputDir}/report.md` (written
// directly by render-report.mjs) is ever meant to be scored.
//
// Usage:
//   node create-scratch-dir.mjs [outputDir]
//
// Emits the absolute path of the created directory to stdout (a single line,
// trailing newline). Exit 0 on success, 3 when no candidate base is writable.

import { mkdtempSync } from 'node:fs';
import { join } from 'node:path';

const PREFIX = 'itsm-employee-agent.';

// Candidate scratch bases, in priority order. `${outputDir}` is LAST so
// transient captures never enter the scored tree except when no temp dir works.
const candidates = [];
const tmp = (process.env.TMPDIR ?? '').trim();
if (tmp) candidates.push(tmp);
candidates.push('/tmp');
const outputDir = (process.argv[2] ?? '').trim();
if (outputDir) candidates.push(outputDir);

let dir = null;
let lastErr = null;
for (const base of candidates) {
  try {
    dir = mkdtempSync(join(base, PREFIX));
    break;
  } catch (err) {
    lastErr = err;
  }
}

if (dir) {
  process.stdout.write(`${dir}\n`);
} else {
  process.stderr.write(`error: mkdtemp failed under all of [${candidates.join(', ')}]: ${lastErr?.message ?? 'no base dir'}\n`);
  process.exit(3);
}
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 CodeCodexVerifiedInstall
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