Claude Cursor opencode Skill

orchestration-envelope

Internal machine-result contract for headless agentic-workflow drivers. The executable source is @gtrabanco/agentic-workflow-schema: strict Envelope v2 for workflow-status, compact SkillOutcome v1 for driven work, compatibility parsing, and deterministic document snapshots. Not a

LLM Mart · 0 points · 0 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download gtrabanco-agentic-workflow-skills_orchestration-envelope-4b3a56b.zip · 4 KB
Part of gtrabanco/agentic-workflow — 33 skills

Install

skills CLI npx skills add https://github.com/gtrabanco/agentic-workflow/tree/main/skills/orchestration-envelope
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install gtrabanco-agentic-workflow@llmmart
Git git clone https://github.com/gtrabanco/agentic-workflow.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole gtrabanco/agentic-workflow collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Machine result contract (internal)

Interactive skills remain text-first. A headless driver obtains a compact, validated result at the boundary; it does not add a repeated JSON section to every user-facing skill.

The canonical Turn contract remains here for the executor and review skills that load it.

The executable source of truth is @gtrabanco/agentic-workflow-schema: types, JSON Schemas, renderOutputInstruction(skill), parseTurn(input), and compileWorkflowSnapshot(input). This document states the policy only; do not copy a second schema here.

Output profiles

WORKFLOW_SKILL_PROFILES is the authoritative inventory.

  • workflow-status always returns the strict Envelope v2 sensor result. Its envelope includes the detailed project view under detail.
  • The other driver-invoked skills return SkillOutcome v1 only when the driver appends renderOutputInstruction(skill) to that invocation. It has the small model-owned fields: outcome, next intent/targets, blockers, questions, discoveries, and evidence references.
  • ship-roadmap is the conductor, not a worker profile: it keeps its native terminal SHIP: banner and is parsed by its own fixed turn contract.
  • Interactive invocations emit their normal human-readable reports; no driver result is required.

Both results are one final fenced json block. The package rejects unknown keys at the routing boundary. Repository facts are never reconstructed from model prose: the driver compiles WorkflowSnapshot v1 from its selected, versioned documents and caller-supplied repository facts.

Driver protocol

  1. Read the profile and append renderOutputInstruction(skill) only for a driven invocation.
  2. Pass the final response to parseTurn({skill, text, context}). Keep the returned source and diagnostics with the run journal.
  3. On an absent, malformed, or invalid machine result, re-invoke the same session once with: Emit only the machine result for the turn above.
  4. Parse the repair reply. A second failure is driver-level FAILED; never retry indefinitely and never turn arbitrary prose into workflow facts.

Compatibility is deliberately narrow: it can repair documented legacy v2 shapes only when the missing value is mechanically knowable. A nonzero issue count without issue identities, an unmatched numeric unit id, or unrelated prose remains invalid and is surfaced to the driver.

Contract evolution

  • Envelope v2 is strict for new drivers. detail is required (usually null) and skill-specific extensions live inside it; design_candidates, for example, is detail.design_candidates, never a root key.
  • workflow-status retains Envelope v2 for existing sensor consumers. parseEnvelope() remains the legacy-compatible package API; new consumers use parseEnvelopeV2Strict() or parseTurn().
  • SkillOutcome v1 and WorkflowSnapshot v1 are separate, versioned JSON Schemas. A breaking change to any published contract is a package major.

Normalized Repository State

Drivers call discover-repository-state before planning and retain the frozen docs/workflow/REPOSITORY_STATE.md reference. WorkflowSnapshot v1 preserves unknowns, provenance, and declared contradictions; a driver routes a contradiction to resolve-repository-state rather than silently replacing it.

Files (agentic-workflow)
  • references
    • TURN_CONTRACT.md 4.9 KB
      # Canonical Turn Contract (orchestration-envelope owner)
      
      ## Turn contract — verify before ending the turn
      
      ```
      ✓ 1. Branch verified FIRST (`git branch --show-current` RUN, output pasted; default branch → new branch created before edits). Never work on main/master.
      ✓ 2. All pre-edit gates (phase-lint, architectural invariants, dependency) RUN, plus frozen acceptance verified, with commands/exit codes pasted. Any FAIL without an allowed override → STOP.
      ✓ 3. `git add`, `git commit -m "<type>(<scope>): <summary>"` EXECUTED; SHA pasted. Commits you did not run do not count.
      ✓ 4. Unit finished (single-pass/--fix/final phase)? `git push`, `gh pr create` EXECUTED; PR URL printed in chat (with --body-file, real Markdown, Closes #N). Roadmap/fix-index updated to `done · [#<pr>](<pr-url>)` in follow-up commit. For mid-phase push rules when a PR is already open, see per-consumer supplement (§ Push policy supplement).
      ✓ 5. Clean-tree check LAST (`git status --porcelain` RUN, output pasted). No uncommitted changes (code or docs). PR branch not ahead of remote.
      ✓ 6. Artifact language: explicit user > project docs > English.
      ✓ 7. Descope guard applied to every issue created this turn (dated ## Amendments in SPEC before issue).
      ✓ 8. Out-of-scope findings classified per Opportunistic finding policy, recorded in decisions.md; proposals created no issue without explicit user triage.
      ✓ 9. Closing `→ Next:` block printed as ABSOLUTE last output.
      ✓ 10. Machine result emitted if driver requested (package output profile).
      ✓ 11. No reconstruction from memory — missing reference → STOP.
      ```
      
      **Single owner:** orchestration-envelope/references/TURN_CONTRACT.md. All skills load this + skill-specific additions only. Duplication forbidden. Missing reference = STOP.
      
      **Push policy supplement:** Box 4 covers the end-of-unit push. Some consumers (e.g. `execute-phase/references/PREFLIGHT.md`) define additional push rules for mid-phase commits when a PR is already open — those per-consumer supplements extend this contract and must be loaded alongside it by the consumer skill.
      
      ## Machine-check profile (boxes 1–5)
      
      Boxes 1–5 are mechanical. Demonstrate them by running the verifier — the
      scaffold shim `template/.agentic-workflow/hooks/turn-contract.sh` (bash + git +
      gh; presence-only box2 — the conditional phase-lint clause is engine-only, so
      a shim receipt leaves that clause unverified, ED-52-3) or the producer-crate
      engine `packages/agentic-workflow/bin/turn-contract.mjs` — and pasting its
      one-line receipt beside the git/gh evidence. When the receipt is pasted,
      reciting boxes 1–5 in prose is **not** required. Verifier unavailable (no bash,
      or no shim/engine in the project)? Recite boxes 1–5 exactly as before — the
      profile never weakens a box, and a turn with neither receipt nor recitation is
      unverified. Boxes 6–11 are unchanged: they stay agent-attested judgment calls
      no script may speak for. The closing `→ Next:` block may be echoed from the
      `workflow-status` envelope instead of hand-authored: `next.recommended`
      supplies the recommended line and `next.alternatives` the `·` sub-bullets,
      preserving the fixed block shape.
      
      ```text
      turn-contract-receipt@1
      ok-line:    TURN-CONTRACT ok
      fail-line:  TURN-CONTRACT fail box<N>: <code>
      codes:      branch-default | not-a-repo | no-commits | acceptance-missing |
                  phase-lint-failed | pr-not-open | pr-head-mismatch |
                  pr-unreachable | dirty-tree | ahead-of-remote
      exit:       0 ok | 1 contract fail | 2 usage error
      order:      boxes 1→5, first failure wins; within box5, dirty-tree precedes
                  ahead-of-remote
      stdout:     exactly one line; diagnostics never (git/gh evidence stays in the
                  agent's transcript)
      ```
      
      ## Hand-off grammar (versioned — read by `scripts/normative-drift.test.mjs`)
      
      Box 9's closing hand-off and box 10's machine result are ordered here, so the
      tokens they may use are declared as grammar rather than prose. Every `from`/`to`
      pair below must exist in the schema package's `WORKFLOW_TRANSITION_TABLE`, and
      every field row must be a key that package's envelope validator declares: a pair
      or a key no machine surface defines is a defect in this file, never in the table.
      
      ```text
      hand-off-transitions@1
      from | to
      workflow-intent:review-spec | workflow-intent:plan-feature
      workflow-intent:plan-feature | workflow-intent:review-plan
      workflow-intent:review-plan | workflow-intent:execute-phase
      workflow-intent:plan-fix | workflow-intent:review-plan
      workflow-intent:review-plan | workflow-intent:design-feature
      workflow-intent:execute-phase | workflow-intent:review-change
      workflow-intent:review-change | workflow-intent:audit-pr
      workflow-intent:audit-pr | workflow-intent:merge
      workflow-intent:triage-issue | workflow-intent:execute-phase
      workflow-intent:status | workflow-intent:design-feature
      ```
      
      ```text
      hand-off-fields@1
      # machine: envelope
      object | field
      next | recommended
      next | alternatives
      next | tier
      next | suggested
      next | continuation
      ```
      
      
  • SKILL.md 3.8 KB
    ---
    name: orchestration-envelope
    user-invocable: false
    version: 2.1.0
    author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
    license: MIT
    description: >
      Internal machine-result contract for headless agentic-workflow drivers. The
      executable source is @gtrabanco/agentic-workflow-schema: strict Envelope v2
      for workflow-status, compact SkillOutcome v1 for driven work, compatibility
      parsing, and deterministic document snapshots. Not a menu entry.
    ---
    
    # Machine result contract (internal)
    
    Interactive skills remain text-first. A headless driver obtains a compact,
    validated result at the boundary; it does not add a repeated JSON section to
    every user-facing skill.
    
    The canonical [Turn contract](references/TURN_CONTRACT.md) remains here for
    the executor and review skills that load it.
    
    The executable source of truth is
    [`@gtrabanco/agentic-workflow-schema`](../../packages/agentic-workflow-schema/):
    types, JSON Schemas, `renderOutputInstruction(skill)`, `parseTurn(input)`, and
    `compileWorkflowSnapshot(input)`. This document states the policy only; do not
    copy a second schema here.
    
    ## Output profiles
    
    `WORKFLOW_SKILL_PROFILES` is the authoritative inventory.
    
    - `workflow-status` always returns the strict **Envelope v2** sensor result.
      Its envelope includes the detailed project view under `detail`.
    - The other driver-invoked skills return **SkillOutcome v1** only when the
      driver appends `renderOutputInstruction(skill)` to that invocation. It has
      the small model-owned fields: outcome, next intent/targets, blockers,
      questions, discoveries, and evidence references.
    - `ship-roadmap` is the conductor, not a worker profile: it keeps its native
      terminal `SHIP:` banner and is parsed by its own fixed turn contract.
    - Interactive invocations emit their normal human-readable reports; no driver
      result is required.
    
    Both results are one final fenced `json` block. The package rejects unknown
    keys at the routing boundary. Repository facts are never reconstructed from
    model prose: the driver compiles `WorkflowSnapshot v1` from its selected,
    versioned documents and caller-supplied repository facts.
    
    ## Driver protocol
    
    1. Read the profile and append `renderOutputInstruction(skill)` only for a
       driven invocation.
    2. Pass the final response to `parseTurn({skill, text, context})`. Keep the
       returned source and diagnostics with the run journal.
    3. On an absent, malformed, or invalid machine result, re-invoke the same
       session once with: `Emit only the machine result for the turn above.`
    4. Parse the repair reply. A second failure is driver-level `FAILED`; never
       retry indefinitely and never turn arbitrary prose into workflow facts.
    
    Compatibility is deliberately narrow: it can repair documented legacy v2
    shapes only when the missing value is mechanically knowable. A nonzero issue
    count without issue identities, an unmatched numeric unit id, or unrelated
    prose remains invalid and is surfaced to the driver.
    
    ## Contract evolution
    
    - Envelope v2 is strict for new drivers. `detail` is required (usually `null`)
      and skill-specific extensions live inside it; `design_candidates`, for
      example, is `detail.design_candidates`, never a root key.
    - `workflow-status` retains Envelope v2 for existing sensor consumers.
      `parseEnvelope()` remains the legacy-compatible package API; new consumers
      use `parseEnvelopeV2Strict()` or `parseTurn()`.
    - `SkillOutcome v1` and `WorkflowSnapshot v1` are separate, versioned JSON
      Schemas. A breaking change to any published contract is a package major.
    
    ## Normalized Repository State
    
    Drivers call `discover-repository-state` before planning and retain the frozen
    `docs/workflow/REPOSITORY_STATE.md` reference. `WorkflowSnapshot v1` preserves
    unknowns, provenance, and declared contradictions; a driver routes a
    contradiction to `resolve-repository-state` rather than silently replacing it.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related