Run the spec-tree TDD flow on a subtree or discover work from spx/EXCLUDE
From spec-treenpx claudepluginhub outcomeeng/claude --plugin spec-tree[--agent] [node-path]/applyQueries Supabase for pending improvements, displays for interactive review with confidence scores, and applies approved changes to plugin files with backups. Supports --auto, --preview, --id.
/applyApply pre-built spinner verb themes. Use /spinnerverbs:apply [startrek|gameofthrones|mandalorian] --parody --cynic --scope [local|project|user]
/apply<!-- tldr ::: apply pending waymarks from plan document with interactive review -->
Three modes:
/apply some/node): Run TDD on the given subtree, then stop.spx/EXCLUDE — nodes with specs and tests but no implementation.--agent (/apply --agent some/node): Launch the applier subagent to run the full flow autonomously.Git Status:
!git status --short || echo 'Not a git repo'
Recent Commits:
!git log --oneline -5 || echo 'Not a git repo'
Project Language Indicators:
!ls pyproject.toml package.json tsconfig.json 2>/dev/null || echo 'No indication of Python or TypeScript'
</context>
If $ARGUMENTS contains --agent, extract the node path from the remaining arguments and launch the applier agent:
Agent tool → { "subagent_type": "spec-tree:applier", "prompt": "Apply the spec-tree TDD flow to node: {node-path}" }
The agent runs the full 8-phase flow autonomously and returns when complete. Stop here — do not continue to Step 1.
If $ARGUMENTS is provided (without --agent): The argument is the node path. The work queue is that single node.
If no argument: Check conversation context for a node the user wants implemented. If nothing is clear, read spx/EXCLUDE. Each non-comment, non-blank line is a node path relative to spx/.
If no work is found, report "Nothing to apply" and stop.
When multiple nodes are queued, sort by numeric index prefix (lower first). Lower-indexed nodes constrain higher-indexed ones and must be applied first.
For each node path, in order:
3a. Remove from EXCLUDE
If the node is listed in spx/EXCLUDE, remove its line. Then run the project's sync command (defined in spx/CLAUDE.md) so the node's tests join the quality gate.
3b. Load context
Skill tool → { "skill": "spec-tree:contextualizing", "args": "spx/{node-path}" }
3c. Run the TDD flow
Skill tool → { "skill": "spec-tree:applying" }
This runs the full 8-phase flow: methodology, context, architect, audit, test, audit, implement, audit.
3d. Commit the applied node
Skill tool → { "skill": "spec-tree:committing-changes" }
3e. Move to next node
Do NOT stop or ask the user. Proceed immediately to the next node.
If a node's TDD flow fails (audit gate rejects after max retries, tests won't pass, or implementation blocked):
spx/EXCLUDEWhen all nodes are applied (or on failure), report final status.
</process><success_criteria>
spx/EXCLUDE</success_criteria>