← Files 101ARCHIVED FILE

skills/write-preflight/SKILL.md

2.87 KB · Nov 28, 2026 · 18:12 UTC

↓ Download file

---
name: write-preflight
description: Use when an internal 101 write workflow must check the current tool schema, required data, entity references, mutable state and central policy before one API mutation.
version: "1.0.0"
role: helper
invocation: internal
intents:
  - writes.preflight
depends_on:
  - entity-resolution
required_tools:
  - whoami
optional_tools:
  - get_project_summary
  - list_projects
  - get_task
  - get_event
  - get_company
  - get_price_list
resources:
  - path: ../shared-resources/context-and-identity.md
    kind: semantic-guide
    required: true
  - path: ../shared-resources/safety-and-permissions.md
    kind: semantic-guide
    required: true
  - path: ../shared-resources/events-and-positions.md
    kind: semantic-guide
    required: true
completion:
  statuses:
    - готово
    - частично
    - заблокировано
---

# Preflight Before a Write

Input: the user's explicit action, command, selected entities, proposed fields and original state. Output: valid arguments for one command or a specific blocker. This instruction does not itself authorize a write.

1. Read the current command schema: field names, types, required fields and constraints. Use the original API format.
2. Verify the explicit intent to perform this exact write and that its material parameters are unambiguous. If a material choice remains, return the missing distinction to the goal owner before invoking the write. Reading, a recommendation and an attachment do not replace write intent.
3. Check entity access through `entity-resolution`. Pass the resolved company in the field the command accepts: `company_guid` or `companyGuid`. Do not ask again for an already known company.
4. Reread the mutable object and available permissions immediately before writing. For an event in a selected project, check `permissions.canCreateTransaction` through `get_project_summary`. A company-fund-only event does not require an invented project; the relevant command checks its permissions. For `isSelectionOnly=true`, use permissions from the `list_projects` row: code `5036` when reading the summary does not itself prohibit the first event. Role and balance do not prove write permission.
5. If the command replaces a full list, preserve unchanged elements and compare the current state with the original. Stop on a conflict.
6. Follow the standard server confirmation procedure. Do not invent tokens, confirm for the user or add a parallel procedure. Do not invoke app-only commands from ordinary conversation.
7. After writing, verify the result. If the response is lost, establish the actual state first; retry only with proven idempotency or proof that the operation did not execute.

For events, use the [result and recovery rules](../shared-resources/events-and-positions.md). Return the command, arguments, fresh facts and readiness basis to the primary workflow. Do not guess a missing required part.

SHA-256: a7ec6a14f800ca3a19bfa964c3ea407f4de8649a43562a488726e3263a263caa