Runbook

From oracle/Fusion-Setup-Configuration-Registry · View interactive version

Runbook is an AI agent skill from the GitHub repository oracle/Fusion-Setup-Configuration-Registry. List, search by name, filter by status, and page through the user's Oracle Fusion Run Books; select, open, merge an implementation plan into, and force-complete a run book; create run books from planning payloads; add ad hoc manual tasks; attach files to Run Book tasks; retrieve, summarize, filter,

How to use this skill

Skill file

Run Book

Purpose

Provide the supported technical operations for Oracle Fusion Run Books and

maintain their project bindings. Consume the selected workflow's task plan and

operation request; the router and shared planning skills own scope and task

selection. Use the existing operation contracts below for authentication,

approval, execution, diagnostics and sanitized output.

Preflight

Before dispatch, resolve the exact requested operation, target environment and

unambiguous Run Book or task identity. Validate its required inputs through the

bundled command and read its contract in

runbook-rest-api.md. For project creation,

enforce the canonical plan, allowed project binding state and any registered

prevalidation handoff evidence in Project workspace sequencing guard.

Apply the operation-specific permission, preview and confirmation rules below;

do not introduce an extra confirmation for automatic initial creation. Confirm

artifact destinations and immutable file identity where the operation consumes

or produces a file. Delegate credential acquisition to core authentication;

never bypass a failed input, identity, privilege or approval gate with another

client. On failure preserve the existing command's partial/unknown outcome,

no-write-retry rules and sanitized diagnostics.

Use the bundled commands for all REST calls, status calculations, data normalization, and Markdown formatting. Read runbook-rest-api.md before running a command.

Markdown output

Return every Run Book dashboard and task-detail result as Markdown directly in chat. A successful create-runbook result is also a Run Book dashboard result: return its complete sanitized markdown field before performing any downstream workflow action.

  1. Return the complete markdown field without omissions.
  2. Preserve the useful allow-listed dashboard or task-detail content while excluding IDs, Data Loader configuration, raw responses, credentials, and other suppressed fields.
  3. Keep machine-readable IDs and task indexes internal for follow-up operations unless the user explicitly asks for an ID.
  4. If a dashboard or summary cannot be shown because no active Run Book is available, return exactly: No Run Book is available to show. Create or select a Run Book, then try again. Do not mention Data Loader configuration or command-line options.
  5. For automatic initial Run Book creation, persist the active binding first, then deliver the returned markdown unchanged. Do not invoke a pillar skill, Task Hook, Data Loader, Fusion lookup, source-preparation command, or other downstream workflow action until that dashboard has been delivered to the user.
  6. Accompany the dashboard with a brief status stating what succeeded, what remains incomplete, and any action the user needs to take. Base the status on the user's request and confirmed execution results.

Project workspace sequencing guard

For every new implementation project, including plain-language setup requests without attachments, route through shared.validation.prevalidation and core/project-mgmt/project-workspace-initializer first. Initialize with --no-create-runbook, then generate the persisted local planning artifacts with core/project-mgmt/project-workspace-initializer/scripts/create_project_runbook.py --project-root project/{project_id} --refresh-artifacts while creation remains on hold. Only after the prevalidation handoff below releases that hold, create the initial Oracle Run Book from its canonical persisted runbook-plan.json by supplying --project-root to this skill. The planning script never creates or updates an Oracle Run Book.

For every new-project shared.validation.prevalidation route, --no-create-runbook

holds creation while the local project and pre-Run Book assessment are

prepared. Resume the original creation request only when its authorization

remains in effect, there is no separate user instruction to defer creation, and

the project contains registered evidence for the same scope and environment of

accepted pre_runbook readiness (READY or READY WITH WARNINGS), an

explicit user skip decision, or a registered OVERRIDE_AND_CONTINUE decision

with handoff: continue accepting every outstanding required prevalidation

finding for the exact run, scope and environment. Inspect the original findings,

recommended solutions, user instruction reference and override coverage; an

override preserves the original readiness and does not certify PASS. Preserve earlier failures and mark skipped readiness

unverified. Missing or ambiguous handoff evidence, NOT READY

without an explicit skip or complete result override, and standalone assessments

without an authorized implementation request do not release the hold.

All canonical-plan, pending/unbound state, identity and operation-specific

permission gates still apply. Prevalidation is read-only and does not verify

Run Book writes; implementation creation remains owned by this skill.

Before the automatic initial creation, require runbook_control.status: pending and an empty active_runbook_ref. On success, persist the active Run Book reference and set status: active, then return the command's complete sanitized markdown dashboard before continuing to any downstream workflow step. On a confirmed failure set status: failed; on an indeterminate POST outcome set status: unknown. Do not retry either outcome automatically, and do not permit downstream Fusion submission until the state is active.

Only run create-runbook for an initialized project with a canonical persisted plan and the accepted readiness, explicit skip or result-override evidence required above: after the prevalidation handoff, or when the user later requests creation for a separately deferred project. A creation request, a default CLI option or missing evidence is not an explicit skip. Existing active bindings are never reset to rerun this checkpoint.

Network access for Oracle Fusion commands

Oracle Fusion REST commands require outbound HTTPS.

They read the environment and OAuth configuration from

../../core/auth/fusionEnv.properties; never use hardcoded Fusion credentials.

Delegate all authentication and token-cache selection to core.auth.fusion-oauth-authentication through its shared get_access_token(...) helper. Run Book code must not read, parse, validate, write, or otherwise interpret token-cache contents, or implement an OAuth flow. The command dynamically resolves its default cache to the managed external ~/.fusionaim/<profile-fingerprint>_token.json; --token-cache is an optional caller override. An explicit access token bypasses shared token acquisition and must never be replaced or refreshed automatically.

Before running a command, set the execution workdir to the directory containing this SKILL.md. From that directory, use exactly:

python3 scripts/runbook_rest.py <subcommand> ...

Do not prepend the repository or skill path when this workdir is set.

For these read-only subcommands, request network permission on the first execution attempt:

task-detail remains read-only even though an ORA_CHK_DATA_LOADER detail makes one read-semantic POST to /hcmRestApi/resources/11.13.18.05/dataLoaderDataSets/action/generateRunbookSummary. That action uses Content-Type: application/vnd.oracle.action+json, is not retried for transport or application failures, and does not create or update Run Book or Data Loader data. Treat any Data Load Status request or response-validation failure as an empty result so task details still omit the section.

list-runbooks is also read-only even though the Redwood search resource uses POST. It may refresh authentication and retry once after a cached-token 401 or 403, but it must not be treated as a Run Book write.

On a cached-token 401 or 403, use the shared core-auth service to refresh authentication and retry once only for GETs and the documented read-semantic POST actions. Never use authentication refresh to repeat a create, add, update, or force-complete write.

Send REST-Framework-Version: 9 on every Oracle Fusion REST request.

When the execution environment supports sandbox permissions:

python3 scripts/runbook_rest.py dashboard

Creating run books

Treat create-runbook as a separate write operation.

Merging an implementation plan

Treat merge-runbook as a separate write operation.

Adding ad hoc tasks

Treat add-task as a separate write operation.

Updating tasks

Treat update-task as a separate write operation.

Force-completing a run book

Treat force-complete-runbook as a separate write operation.

Retaining the active Run Book ID

Successful create-runbook, merge-runbook, and dashboard operations activate that Run Book by atomically stamping its WorkerJourneyId into Data Loader's case-sensitive runID property. Automatic initial creation must also persist the project runbook_control binding; runID alone is not authorization for sample generation, payload preparation, upload, or execution. Read commands use an explicitly supplied journey ID first, then a non-empty configured runID; otherwise they fail before authentication. An invalid or duplicated configured value also fails before authentication. Listing, summarizing, retrieving, and formatting individual tasks never change Data Loader configuration. Never print Data Loader config content.

Create a run book from a planning payload

  1. For a project-backed Run Book, use its canonical persisted plan directly. Do not create a separate input artifact, supply taskNotes, or pipe the plan through standard input. The command reads artifacts/shared/runbook/current/runbook-plan.json within the supplied project workspace and internally maps each task's persisted task_description to its Run Book Notes; missing descriptions become empty notes.
  2. Run:

```text

python3 scripts/runbook_rest.py create-runbook --project-root <absolute-project-workspace>

```

  1. Project-backed creation always uses the canonical persisted plan. --input-stdin is not supported for create-runbook.

Route catalog tasks without FSCR guidance

When a catalog-backed task has neither a matching pillar SKILL.md nor a matching flat task-guidance Markdown file, retain it as an ORA_CHK_MANUAL task with the same catalog task name as any other Run Book task. The generated task context identifies shared/common/manual-tasks/SKILL.md as its execution target.

When the user selects or asks to execute that task, invoke shared.common.manual-tasks automatically after the Run Book task detail has been delivered. Pass its persisted manual_task_input, including the task code, task name, catalog task description, offering, functional area, sequence, pillar, skill-selection evidence, business objects, and match reason. The Manual Tasks skill provides guidance only and never performs the Fusion change.

Merge a planning payload into a Run Book

Provide the original planning envelope with plan and taskNotes through standard input. If the user names a target Run Book, resolve it through the standard Run Book list/search flow first; otherwise use the active Run Book.

python3 scripts/runbook_rest.py merge-runbook [--journey-id <journey-id>] --input-stdin

The command reuses the creation payload's taskDetails, sends no journeyDetails, and returns the refreshed target dashboard through the standard Markdown renderer. Do not pre-check duplicate task names; Fusion owns duplicate handling.

Collection pagination and follow-up reads

For tasks, comments, documents and attachments, preserve the user's total_record_fetch_limit, pagination_record_limit, and pagination_limit as runtime CLI options on the first request and every related "show more" / "load more" follow-up. Use pagination_record_limit as the sole per-page record setting for these collections; --page-size is supported only by list-runbooks. Do not silently reset a small test limit to defaults, increase limits to fetch the remainder, or issue multiple CLI invocations to bypass one operation's limits. Authentication retry for the same page remains separate from pagination.

Keep each result's internal pagination metadata, including nextOffset, hasMore, and paginationSettings, together with the selected journey/task and collection. The total-record limit is cumulative across the initial read and all "show more" follow-ups for the same collection, starting at offset zero. A follow-up reuses the same limits and starts at that collection's nextOffset; its remaining total allowance is total_record_fetch_limit - offset. Only the page-call allowance resets for an explicit follow-up. Never reset the offset or increase the total limit to bypass exhaustion. If continuationAllowed is false because the total limit is reached, do not call the CLI again even when hasMore is true. Only an explicit user request to raise the limit or restart permits changing that bound. Use --offset for dashboard, summary, list-tasks, or get-documents; for task-detail, use --attachments-offset, --comments-offset, or --documents-offset for the collection being continued. Keep separate cursors for separate collections. If the collection is ambiguous, clarify which collection to continue. Never restart from zero unless the user requests a refresh. When hasMore is false, do not issue another collection read. If continuation context is missing, ask for it instead of guessing or fetching everything.

Preserve the existing summary and task-detail output format. Do not append automatic pagination availability, partial-count, page-only or total-limit notices to the displayed Markdown. Keep pagination metadata internal for continuation decisions. Return only newly fetched records for "show more"; do not refill or re-render all remaining records from a prior larger response. Example: limits 5 total, 2 per page and 1 page allow follow-up offsets 2 and 4, fetching two records and then one; the total cap prevents fetching a sixth record.

Show a run book

  1. Pass --journey-id only when the user explicitly identifies another Run Book. Otherwise let the command resolve the active ID from a non-empty Data Loader runID; if none is configured, stop and request one.
  2. Run:

```text

python3 scripts/runbook_rest.py dashboard [--journey-id <journey-id>]

```

The command retrieves tasks first and optional journey metadata second, stamps the successfully opened journey ID into Data Loader's runID, and formats the exact non-empty JourneyTitle; if metadata retrieval fails or the title is empty, it omits the heading and its spacing.

  1. Return the command's complete markdown dashboard.
  2. Keep ParentWorkerJourneyId and WorkerJourneyTaskId out of the dashboard. The command retains them in its taskIndex output for follow-up operations.

For a filtered dashboard, first run python3 scripts/runbook_rest.py list-tasks [--journey-id <journey-id>], select only clearly relevant zero-based task indexes, and repeat --include-task-index <index> on the dashboard command. Ask the user when relevance is ambiguous. Filtering must never alter the retrieved JourneyTitle.

Show all run books

Interpret show all runbooks as all current-user Run Books. Map explicit open, completed, and overdue requests to the exact Fusion values Open, Completed, and Overdue. All other status wording uses the default all-status scope.

  1. Run python3 scripts/runbook_rest.py list-runbooks for the first page. Return only the command's markdown field; retain runbookIndex, WorkerJourneyId, and offsets for follow-up selection and pagination. Keep raw responses internal.
  2. The command searches self journeys with subject type RBK, uses the resolved status scope, and renders the list under Runbook | Status | My tasks.
  3. When the user says load more, use the prior result's internal nextOffset, resolved status values, and original name query when active. Never restart at offset 0 unless the user asks to refresh.
  4. When the user identifies a listed Run Book by name or position, resolve it against the current runbookIndex. Ask the user to choose when multiple names match similarly.
  5. Pass the selected WorkerJourneyId to python3 scripts/runbook_rest.py dashboard --journey-id <journey-id>. The existing dashboard flow activates that value as the Data Loader runID.

For a name search, preserve the exact non-empty user-entered query and send it through standard input to python3 scripts/runbook_rest.py list-runbooks --query-stdin. The command adds query and searchFields: ["JourneyDisplayName"] to the normal self-journey request while preserving the finder, status filters, display fields, and offset. When loading more search results, reuse both the exact original query and the prior internal nextOffset; do not silently switch back to the unfiltered list.

Force-complete a run book

  1. Resolve the selected Run Book's WorkerJourneyId from the current list or active Run Book context. Ask the user to choose if the target is ambiguous.
  2. Require an explicit force-complete request, then run python3 scripts/runbook_rest.py force-complete-runbook --journey-id <journey-id> with its separately scoped write approval.
  3. Return the command's markdown field only after confirmed success. Never retry an indeterminate request.

Summarize a run book

Run python3 scripts/runbook_rest.py summary [--journey-id <journey-id>] and return its summary value. Format the dashboard only when the user also asks to see tasks.

Drill into a task

  1. Run python3 scripts/runbook_rest.py list-tasks --journey-id <journey-id> and choose the most relevant task-name match. Ask the user to choose when multiple candidates are similarly relevant.
  2. Retain the selected task's parent and task IDs for the task-detail request.
  3. Run:

```text

python3 scripts/runbook_rest.py task-detail --journey-id <journey-id> --parent-worker-journey-id <parent-id> --worker-journey-task-id <task-id>

```

Pass the exact current WorkerJourneyId returned by create-runbook or used to open the dashboard as <journey-id>. It is the Data Load Status runId; never substitute ParentWorkerJourneyId.

  1. Return the command's complete markdown task detail without a raw field panel. Always preserve this task-detail result and stop after delivering it.

Task details use a five-column table: Sequence, Task, Status, % Completed, and Required. Run Book dashboards use only Sequence, Task, and Status. It then shows visible Notes text derived from the value returned by Oracle Fusion, the Object Notes comment history below Notes, task attachments when available, and the conditional Data Load Status described below. Do not encode or decode Notes. It applies these additional rules:

Format provided attachment, external, and document URLs as received. Keep the Markdown formatter's existing visible-text Notes sanitization.

Add an ad hoc task

  1. Use the current WorkerJourneyId. Stop and request it when it is unavailable.
  2. Create exactly one manual task. Preserve an explicit task name; otherwise derive one concise name from the requested work. Accept optional sequence, required, notes, allow_comments, allow_attachments, and performer_type only when the user supplies them. Apply the documented defaults for omitted fields.
  3. sequence must be a positive integer. When omitted, the service appends the task after the current highest sequence. Preserve supplied Notes exactly without encoding, decoding, sanitizing, or rewriting them.
  4. Send the input object through standard input, omitting optional fields that were not supplied:

```json

{

"name": "Adhoc Task",

"required": false,

"sequence": 30,

"allow_comments": true,

"allow_attachments": true,

"performer_type": "ORA_INITIATOR",

"notes": "lorem ipsum"

}

```

  1. Run:

```text

python3 scripts/runbook_rest.py add-task --journey-id <journey-id> --input-stdin

```

  1. When added is true, return the command's complete markdown task detail with the successful add outcome. On exit code 3, report the returned partial or indeterminate result and never rerun add-task.

Attach files to a task

Use this workflow only to store files as Run Book task attachments. When files are intended for Data Loader validation, preparation, upload, or initiation, use core/data-loader and let that skill determine whether the files are supported. If the intended outcome is unclear, ask whether the files should be attached to the task or processed as a data load.

  1. Resolve one unambiguous Run Book task and retain its identifiers internally.
  2. Prepare and present the exact attachment target and immutable file preview defined in runbook-rest-api.md, then obtain operation-specific approval immediately before upload.
  3. Build the standard-input payload defined in runbook-rest-api.md and run exactly once:

```text

python3 scripts/runbook_rest.py attach-task-files --parent-worker-journey-id <parent-id> --worker-journey-task-id <task-id> --input-stdin

```

  1. If a file changes after approval, stop and prepare a new preview. Stop the batch after the first failed or indeterminate upload, and never retry an attachment POST.
  2. Return the command's allow-listed result and report every file status. Do not expose local paths, Base64 content, access tokens, or attachment IDs.

Update the current task

Use PATCH and/or one Object Notes POST only when the user explicitly requests an update for an unambiguous current task.

  1. Resolve the task IDs internally as in the drill-down flow.
  2. Send the requested updates through --input-stdin as one JSON object. Supported fields are taskName, description, notes, status, sequence, taskPercentage, comments, and reopen.
  3. Use { "replace": "..." } or { "append": "..." } only for notes. Supply comments as text; it creates one new Object Notes comment and preserves supplied HTML exactly. Do not use replace or append for comments.
  4. Use status values open, in-progress, ready-for-review, completed, or not-applicable; use a whole-number taskPercentage from 0 through 100. Do not infer either value from discussion alone.
  5. reopen resets status and percentage only; it does not remove comment history. Existing flags remain CLI compatibility inputs only.
  6. The command PATCHes non-comment fields first, then creates one Object Notes comment when supplied. It retrieves refreshed task detail after success and returns its Markdown. On partial success or failure, do not retry either write.

Safety

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.