Schema Workflow logo

Schema Workflow

Community
jpicklyk
schema-workflow

Internal, hook-triggered: drives a schema-typed MCP item through its gate-enforced phases, filling required notes.

Overview

Publisherjpicklyk
Repositorytask-orchestrator
Skill nameschema-workflow
Stars
204
Forks
22
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jpicklyk on GitHub. Read the source before you install it.

Installation

Install the Schema Workflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jpicklyk/task-orchestrator.git /tmp/task-orchestrator
mkdir -p .claude/skills
cp -r /tmp/task-orchestrator/claude-plugins/task-orchestrator/skills/schema-workflow .claude/skills/schema-workflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Schema Workflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Schema Workflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Schema Workflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Schema Workflow

Drive any schema-tagged MCP work item through its gate-enforced lifecycle. This skill is schema-driven — it reads note requirements and authoring guidance from the item's tag schema at runtime, never hardcoding what notes should contain.

When this skill applies: Any item whose type field matches a schema defined in work_item_schemas: in .taskorchestrator/config.yaml, or whose tags match a schema in note_schemas: (legacy). Items without a matching type or tags advance freely (no gates).


Entry Point

Start by loading the item's context:

get_context(itemId="<uuid>")

The response tells you everything needed to proceed:

FieldWhat it means
currentRoleWhich phase the item is in (queue, work, review, terminal)
canAdvanceWhether the gate is satisfied for the next start trigger
missingRequired notes not yet filled for the current phase
expectedNotesAll notes defined by the schema, with exists and filled status (keys-only — no description/guidance/skill)
guidanceKeyKey of the first unfilled required note with guidance; resolve its text via query_items(operation="schema", itemId=...)
noteSchemaThe full schema definition matching the item's tags

If currentRole is terminal, the item is already complete — nothing to do.

If noteSchema is null or empty, no schema matches the item. This means either:

  • .taskorchestrator/config.yaml doesn't exist or has no work_item_schemas or note_schemas section
  • The item's type field doesn't match any configured schema key in work_item_schemas
  • The item's tags don't match any configured schema key in note_schemas (legacy fallback)
  • No default schema exists as a fallback

Inform the user: "No schema found for this item's type/tags. Use /manage-schemas to configure gate workflows." The item can still advance freely — this is non-blocking, but gate enforcement won't apply.


Phase Progression Loop

Each phase follows the same pattern: fill required notes, then advance.

Step 1 — Identify missing notes

From get_context, check the missing array. These are the required notes that must be filled before the gate allows advancement.

If missing is empty and canAdvance is true, skip to Step 3.

Step 2 — Fill notes using guidanceKey

For each missing note, guidanceKey names the note with authoring guidance; resolve its text via query_items(operation="schema", itemId=...) and follow it.

manage_notes(
  operation="upsert",
  notes=[{
    itemId: "<uuid>",
    key: "<note-key>",
    role: "<note-role>",
    body: "<content following the resolved guidance>"
  }]
)

Keep the body distilled prose; route verbatim artifacts (test output, diffs, logs) through bodyFromFile instead of pasting them inline.

How guidanceKey works:

  • get_context returns guidanceKey (a note key) for the first unfilled required note
  • After filling that note, call get_context again to get the key for the next one
  • Resolve the key's guidance text via query_items(operation="schema", itemId=...)
  • If guidanceKey is null, no unfilled required note has guidance — use the note's description (also from the schema op) as a general guide

Skill-assisted note filling:

  • If the get_context response includes skillPointer (a non-null string), invoke that skill via the Skill tool before filling the note
  • The skill provides a structured evaluation workflow — follow its steps, then use the output to fill the note
  • skillPointer is derived from the first unfilled required note's skill field in the schema
  • If skillPointer is null, use the resolved guidanceKey text as the authoring guide
  • description/guidance/skill are not in expectedNotes (keys-only) — fetch them via query_items(operation="schema", itemId=...)

Batch filling: If you already know the content for multiple notes (e.g., from a completed plan or implementation), fill them all in one manage_notes call. You only need to re-check get_context between notes when you need the next guidanceKey for authoring direction.

Step 3 — Advance to the next phase

advance_item(transitions=[{ itemId: "<uuid>", trigger: "start" }])

The response confirms the transition:

FieldCheck
appliedMust be true — if false, the gate rejected (notes still missing)
newRolePhase you moved to (previousRole is omitted from success results)
expectedNotesNotes required for the new phase (fill these next)
unblockedItemsOther items that were waiting on this one

If the gate rejects: The response lists which notes are missing. Fill them (Step 2), then retry. Do not call get_context first — advance_item already told you what's needed.

If the response instead has applied: false with errorCode: "resource_unavailable" (errorKind: "transient"): this is NOT a note-gate rejection — do not fill more notes and do not retry the same call. A shared resource this item declares via a resources: trait is currently held by another item entering WORK. Report the contended contendedResources key(s) (and retryAfterMs if present) back to the orchestrator/user rather than spin-retrying; see /status-progression → "resource_unavailable" for the full recovery pattern.

Step 4 — Repeat or finish

After advancing, check whether the new phase has its own required notes:

  • If expectedNotes in the advance response shows unfilled required notes → loop back to Step 2
  • If newRole is terminal → the item is complete
  • Otherwise, continue work in the new phase and fill notes as progress is made

Phase-Specific Guidance

The schema defines which notes belong to which phase. Common patterns:

PhaseTypical purposeWhen notes get filled
queueRequirements, design, reproduction stepsDuring planning, before implementation starts
workImplementation notes, test results, fix summariesDuring or after implementation
reviewDeploy notes, verification resultsAfter implementation, during validation

The actual note keys and content requirements vary per schema — always check expectedNotes rather than assuming specific keys exist.


Orchestrator vs Subagent Responsibility

Orchestrator (this skill's primary user):

  • Fills queue-phase notes (requirements, design) during planning
  • Dispatches implementation agents with the item UUID
  • After implementation agents return, advances the item via advance_item(start) and inspects newRole:
    • If review: dispatches review agents or performs inline review
    • If terminal: item completed through a lightweight lifecycle (no review-phase notes in schema)
  • Performs the final terminal transition (review→terminal) after the review verdict
  • Uses this skill for queue-phase note filling and terminal advancement

Implementation agents (agent-owned-phase model):

  • Receive the full phase-aware protocol automatically via the subagent-start hook
  • Call advance_item(start) once to enter work phase (queue→work)
  • Fill work-phase notes using the JIT progression loop (guidanceKey + skillPointer)
  • Return to the orchestrator — do NOT call advance_item again
  • The orchestrator advances the item to the next phase and handles all further routing

Review agents (dispatched into an item already in review):

  • Receive the subagent-start hook, which tells them to call advance_item(start)
  • Since the item is already in review, advance_item returns applied: false — this is expected
  • The hook's fallback applies: call get_context(itemId=...) to get guidance instead
  • Fill review-phase notes (e.g., review-checklist), report verdict, return
  • Do NOT call advance_item again — the orchestrator handles the terminal transition

Key invariant: Agents own phase entry (one advance_item(start) call to enter their assigned phase). The orchestrator owns all phase-to-phase transitions — advancing the item, inspecting the schema to determine the next phase (review or terminal), and dispatching phase-appropriate agents. Review agents fill review-phase notes and return — they do not advance items.


Creating a New Schema Item

When creating a new item with a schema, set the type field to the schema key:

manage_items(
  operation="create",
  items=[{ title: "...", type: "<schema-key>", priority: "medium" }]
)

The type field is the primary schema selector — it maps directly to a key in work_item_schemas:. Tags can still be used for additional categorization and as a legacy schema fallback, but type takes precedence.

Check expectedNotes in the response — it lists all notes the schema requires across all phases. Begin filling queue-phase notes immediately, then follow the progression loop above.


Error Recovery

Gate rejection: advance_item returns applied: false with the missing note keys. Fill them and retry — no need for a separate get_context call.

Resource-lease contention: advance_item returns applied: false with errorCode: "resource_unavailable" and errorKind: "transient" instead of missing notes — distinct from a gate rejection. Do not fill notes in response to this; it means another item currently holds a resource this item's traits declare. Wait (retryAfterMs is a hint) or work a different item; never spin-retry the same advance_item call.

Wrong phase notes: If you try to upsert a note with a role that doesn't match the item's current role, the note is still created (notes are not phase-locked), but it won't satisfy a gate for a different phase. Always match the note's role to the schema definition.

Blocked items: If advance_item fails because the item is blocked by a dependency, resolve the blocking item first. Use get_blocked_items or query_dependencies to diagnose.

No schema match: Items whose type doesn't match any schema in work_item_schemas and whose tags don't match any schema in note_schemas have no gate enforcement. advance_item will succeed without notes. This is by design — only typed or tagged items require structured note workflows.

Frequently asked questions

What does the Schema Workflow AI skill do?

Internal, hook-triggered: drives a schema-typed MCP item through its gate-enforced phases, filling required notes.

Why use Schema Workflow on TypingMind?

Because you install it once and use it with any model. Schema Workflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Schema Workflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jpicklyk/task-orchestrator/tree/main/claude-plugins/task-orchestrator/skills/schema-workflow. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Schema Workflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Schema Workflow?

As many as you like. As long as a model supports skills, you can use Schema Workflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Schema Workflow AI skill free?

Yes. It is published on GitHub by jpicklyk under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇