ALWAYS invoke this skill before implementing any spec-tree work item. NEVER write code for a spec-tree node without this skill.
From spec-treenpx claudepluginhub outcomeeng/claude --plugin spec-treeThis skill uses the workspace's default tool permissions.
scripts/enforce-gates.shSearches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
<quick_start>
</quick_start>
<language_detection>
Before starting Phase 3, determine the project language:
tsconfig.json exists → TypeScriptpyproject.toml or setup.py exists → PythonUse the detected language for ALL Phases 3–8. Do not switch mid-flow.
</language_detection>
<skill_map>
Phases 1–2 are language-independent. Phases 3–8 use the detected language.
| Phase | Purpose | TypeScript | Python |
|---|---|---|---|
| 1 | Load methodology | Skill("spec-tree:understanding") | same |
| 2 | Load context | Skill("spec-tree:contextualizing", args: "{node-path}") | same |
| 3 | Architect | Skill("architecting-typescript") | Skill("architecting-python") |
| 4 | Architecture audit | Skill("auditing-typescript-architecture") | Skill("auditing-python-architecture") |
| 5 | Write tests | Skill("testing-typescript") | Skill("testing-python") |
| 6 | Test audit | Skill("auditing-typescript-tests") | Skill("auditing-python-tests") |
| 7 | Implement | Skill("coding-typescript") | Skill("coding-python") |
| 8 | Code audit | Skill("auditing-typescript") | Skill("auditing-python") |
You MUST invoke the exact Skill tool call shown. Do not substitute, skip, or reorder.
</skill_map>
<phases> <phase number="1" name="Load methodology" frequency="once per session">Invoke /understanding.
This loads the spec-tree methodology — node types, assertion formats, durable map rules. Skip if SPEC_TREE_FOUNDATION marker is already present in this session.
Do not proceed until complete.
</phase> <phase number="2" name="Load work item context" frequency="every node">Invoke /contextualizing with the node path.
Load the full context hierarchy for the specific node — parent chain, sibling nodes, applicable decisions, assertions.
Repeat for every new node. Do not reuse context from a previous node.
Do not proceed until complete.
</phase> <phase number="3" name="Architect">Invoke the architecting skill for the detected language.
Produce the ADR(s) for the work item. The architecture must be complete before audit.
</phase> <phase number="4" name="Architecture audit" gate="true">Invoke the architecture audit skill for the detected language.
REJECT → fix → re-invoke this phase. Loop until APPROVED.
</phase> <phase number="5" name="Write tests">Invoke the testing skill for the detected language.
Write tests for all assertions in the spec. Tests come before implementation — no exceptions.
</phase> <phase number="6" name="Test audit" gate="true">Invoke the test audit skill for the detected language.
REJECT → fix → re-invoke this phase. Loop until APPROVED.
</phase> <phase number="7" name="Implement">Invoke the coding skill for the detected language.
Write implementation code. All tests from Phase 5 must pass.
</phase> <phase number="8" name="Code audit" gate="true">Invoke the code audit skill for the detected language.
REJECT → fix → re-invoke this phase. Loop until APPROVED.
</phase> </phases><review_gates>
Phases 4, 6, and 8 are blocking review gates. Each audit skill emits APPROVED or REJECT.
APPROVED is not present, stop — invoke Phase 4.APPROVED is not present, stop — invoke Phase 6.APPROVED is not present, stop — invoke Phase 8.On REJECT: fix the findings, re-invoke the same audit skill, and scan again.
3 consecutive REJECTs on the same gate → STOP. Report which gate failed and why, and ask the user for guidance.
</review_gates>
<rationale> When something breaks or behaves unexpectedly, your instinct will be to write ad hoc code — a quick script, a throwaway snippet, a print-and-pray debugging session. That instinct is the symptom, not the fix. The problem you hit exists because your tests were insufficient. The ad hoc code patches over one instance; a proper test catches every future instance too.This is not slower. The ad hoc script you were about to write takes the same effort as a test, but the script gets deleted and the test stays.
</rationale><success_criteria>
Scan the conversation for these markers before declaring done:
SPEC_TREE_FOUNDATION marker present (Phase 1)SPEC_TREE_CONTEXT marker present (Phase 2)APPROVEDAPPROVEDAPPROVED</success_criteria>