.claude/skills/deconstruct/SKILL.md
This skill should be used when the user wants to deconstruct a workflow, break down a business process, define an outcome for an agent system, or deeply analyze a workflow's steps, decisions, data flows, and failure modes. Interactively decomposes a workflow into a structured Workflow Definition using either the 6-question framework (step-decomposed) or an outcome-driven interview (for autonomous agent systems). This is Step 2 of the Business-First AI Framework.
npx skillsauth add jamesgray-ai/handsonai deconstructInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Interactively discover a business workflow and produce a structured Workflow Definition — either step-decomposed (using the 6-question framework) or outcome-driven (capturing goal, constraints, and capability domains for agent systems).
Scenario discovery — Determine how the user is arriving and which path to take:
From Analyze output: If the user references an opportunity report, file path (e.g., outputs/ai-opportunity-report.md), or a specific workflow candidate from an Analyze session, read the Workflow Candidate Summary from the file. Present the available candidates and ask which one to deconstruct. Pre-populate scenario metadata (name, description, trigger, deliverable, autonomy, involvement) from the candidate fields. If the candidate includes a Lens field, carry it forward along with any Business Objective, Stakeholders, and Success Metrics fields. Confirm the pre-populated details with the user. Then choose the path: if the candidate's autonomy = Autonomous, suggest option (c) but still confirm. Otherwise present the three choices below.
Cold entry (no Analyze output): Present three choices as the first question:
"How would you like to approach this? (a) Deconstruct a known process — You can describe the steps and I'll interview you to surface hidden details (b) Start from a problem — You know what's broken; I'll propose a workflow and we refine it together (c) Define an outcome — You know what you want produced but want an agent system to figure out the approach"
After the user chooses, gather scenario details based on their path:
Scope check — one trigger, one deliverable — A workflow has exactly one trigger (what kicks it off) and one deliverable (the tangible output). Test for multiple workflows by checking:
Name the workflow — Present 2-3 name options following naming conventions (2-4 word noun phrase, Title Case). Confirm name, description, outcome, trigger, and type.
Deep dive — Before probing the first step, briefly frame what "context" means: "As we go through each step, I'll ask about the context it needs. Context is any data or information the step requires to do its job — that includes databases and spreadsheets, but also documents, transcripts, emails, style guides, SOPs, or even knowledge that currently lives in someone's head. If the step needs it, it's context."
Work through each step using the 6-question framework:
Propose and react — After the first step of the deep dive, switch to propose-and-react: propose a hypothesis across all dimensions (including context readiness and role transitions for organizational workflows) and ask "What's right, what's wrong, what am I missing?" instead of asking each question individually. Include a context readiness hypothesis: "I think this context lives in [location] and is in [format] which AI can interpret. Is that right?"
Map sequence — After all steps, identify sequential vs. parallel steps and the critical path.
Optimize for AI (step-decomposed path only) — Now that the full process is mapped, step back and challenge it. The user described their current process — but an AI-powered version may not need every step. Present optimization recommendations for the user to react to. Look for:
Present as a propose-and-react summary:
"Now that we've mapped the full process, here's how I'd optimize it for AI:
- Eliminate: [step(s)] — [reason, e.g., 'direct access to your CRM data replaces the manual export']
- Collapse: [step(s)] into one — [reason, e.g., 'AI drafts and formats in a single pass']
- Parallelize: [step(s)] — [reason, e.g., 'no data dependency between these']
- Simplify: [handoff/gate] — [reason, e.g., 'AI evaluation replaces manual QA, human reviews final output only']
- Add: [new step] — [reason, e.g., 'need an explicit context-loading step for data the human carried in their head']
These are recommendations — you may have reasons to keep steps as-is (compliance, audit trail, stakeholder expectations). What looks right, and what should stay?"
Update the refined steps based on the user's confirmed optimizations. Renumber if steps were added, removed, or merged. If the user rejects all optimizations, that's fine — proceed with the original steps.
Validate the workflow (step-decomposed path only) — Before consolidating context, walk through the refined workflow end-to-end and present a validation summary. This is the quality gate that catches gaps before the workflow moves to Design. Check for:
Present as a validation summary:
"Let me validate the workflow before we finalize it. Walking through the end-to-end flow, here's what I found:
- [Finding type]: [specific gap, e.g., 'Step 3 produces a draft but Step 4 expects a formatted document — is there an implicit formatting step?']
- [Finding type]: [specific gap]
- No issues found in: [dimensions that checked out]
Which of these need to be addressed?"
Update refined steps based on the user's responses. If no issues are found, say so and proceed.
Consolidate context — Present a rolled-up "context shopping list" of every piece of context the workflow needs — documents, data, rules, examples, and any other knowledge from the user's domain that the model doesn't have.
Generate Workflow Definition — Produce the structured Workflow Definition and write it to the output file.
When the user selects option (c) or the problem-first funnel recommends outcome-driven, run this interview instead of the step-decomposed deep dive (Steps 4–9). The outcome-driven path handles context discovery internally (question 7), so it skips straight to Generate Workflow Definition (Step 10) after the interview. Same interview principles apply: one question at a time, propose-and-react after the first few answers, push beyond vague answers.
After completing the interview, proceed directly to Generate Workflow Definition (Step 10) using the outcome-driven output format.
Write the Workflow Definition to outputs/[workflow-name]-definition.md where [workflow-name] is the kebab-case workflow name (e.g., lead-qualification).
The Workflow Definition uses a shared header with conditional sections depending on the definition type.
Step-Decomposed or Outcome-DrivenFor each step: number, name, action, sub-steps, decision points, data in/out, context needs, failure modes
Brief record of what changed from the original process and why:
For each artifact: name, description, used by steps, status (Exists/Needs Creation), key contents, AI Accessible? (Yes/Partial/No), readiness notes
For items with Status: Needs Creation, the readiness notes should also capture where the artifact should be persisted — not just that it needs to be created, but that it needs a home AI can reach.
For organizational workflows, also prompt for existing process documentation: SOPs, training guides, compliance requirements, SLAs.
What a successful run produces — the deliverable described concretely.
What the agent system receives to start — trigger, data, materials.
Format, structure, quality expectations, and an example of what "good" looks like.
Boundaries, guardrails, must-do / must-not-do rules.
Evaluation dimensions, what good vs. bad looks like, minimum bar. These feed directly into Step 5 (Test).
Table with columns: Domain Name, Description, Associated Tools/Data. Each domain represents a kind of work the agent system needs to be good at (e.g., research, analysis, writing, data extraction).
External systems, reference materials, with context readiness assessment for each:
Where human review is expected — checkpoints during execution, or final review only.
outputs/[name]-definition.md. Ready for Step 3 — Design."documentation
Write Standard Operating Procedure documentation for workflows and save as markdown files. Selects full or lightweight SOP template based on autonomy level (deterministic vs. guided/autonomous), then adapts for workflow type (Manual, Augmented, Automated). Use when the user asks to write an SOP, document a workflow, create procedure documentation, or capture how a workflow is executed. Triggers on "write an SOP", "document this workflow", "create operating instructions", "how is this workflow executed".
documentation
Write Business Process Guide documentation that explains when, why, and how to execute a complete business process with its component workflows, and save as markdown files. Use when documenting a business process end-to-end, creating playbooks, or explaining how multiple workflows fit together. Triggers on "write process guide", "document this process", "create a playbook for", "how do these workflows connect".
development
This skill should be used when the user wants to sync skills to GitHub, push skill changes to a remote repository, or back up local skills. Syncs Claude Agent Skills from ~/.claude/skills/ (local) to GitHub repository using git commands. Commits changes, pushes to remote, and updates Notion AI Building Blocks with GitHub URLs.
development
This skill should be used when the user wants to register or update AI building blocks (Skills, Agents, Prompts, Context MDs) in the Notion AI Building Blocks database. Triggers after skill creation, agent creation, prompt authoring, context MD updates, or when the user asks to register, add, or track a building block in Notion.