Pre plan workflow

From jpicklyk/task-orchestrator · View interactive version

Pre plan workflow is an AI agent skill from the GitHub repository jpicklyk/task-orchestrator. Internal, hook-triggered when entering plan mode: reads existing MCP items and the declared schemas so the plan accounts for tracked work and gate requirements.

How to use this skill

Skill file

Pre-Plan Workflow - Definition Floor

On entering plan mode, set the definition floor before writing the plan: the baseline of existing work, note requirements and gates the plan must account for. Shapes are in CODE0; ids below are 8-hex shorts and any id field also takes the full UUID.

If MCP is unreachable: plan from conversation context, note in the plan that MCP state could not be verified (existing work may overlap), and re-check after it reconnects.

Step 1: Check existing MCP state

Resolve the scope from the SessionStart context: a ## Project Scope section carries a project rootId (scopes reads); a ## Personal Scope section carries a personal root (anchors only, reads stay unscoped). With no session context, read project.rootId from .taskorchestrator/config.yaml (a file read).

Health check, scoped to the project when a rootId is known (omit ancestorId otherwise):

{"tool": "items_read", "select": "context", "args": {"ancestorId": "9f3a1c22"}}

data is {active, blocked, stalled, claimSummary}; stalled lists active items with unfilled required notes (missing[], guidanceKey, skillPointer). If active, blocked or stalled items relate to the request, avoid planning duplicate work and inspect each one:

{"tool": "items_read", "select": "context", "args": {"itemId": "4b7d0e19"}}

Read schema[] (each note's exists and filled), gateStatus (canAdvance, missing, blockedBy) and guidanceKey; resolve the authoring guidance with items_read schema and fields: ["guidance"]. With nothing tracked, the floor is simply "no existing state"; still do Step 2.

Step 2: Discover declared schemas

Read the resolved config, not the file:

{"tool": "config", "op": "effective", "args": {"rootId": "9f3a1c22"}}

config is an ops tool, so the answer is data.results[0]: types lists the declared types, schemas their notes per phase (required queue notes must exist before work starts; required work notes are captured during implementation), and traits the declared traits, each an object with a name. Each type key is what an item sets as type; a create must pass a declared type. If the config tool is unavailable, read .taskorchestrator/config.yaml as an offline fallback (types are the keys under work_item_schemas:). With no declared schemas, items are schema-free and nothing is gated.

Use the result to inform the plan. Each planned task should:

Load note-bound skills. Once the plan's parent type is known (it may not be at plan-mode entry; resolve it when the tier and shape are clear), look at each required queue note of that type in schemas. For every note that carries skill (a string or a list; a list is loaded in order), load each bound skill before writing the part of the plan that note will hold: a pointer that is a served rule key is fetched with config op rules and followed; any other pointer is invoked as a skill (the convention in schema-workflow).

Step 3: Plan with MCP awareness

Structure the plan knowing it will be materialized after approval:

Continue with plan mode

The prerequisite is done. Proceed with plan mode's normal workflow: explore, design, write the plan. Once it is approved the post-plan hook guides materialization. Do not materialize before approval.

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.