بنقرة واحدة
tp-spec
Manage living spec deltas — scaffold, validate, and merge spec-delta.md files into domain base specs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Manage living spec deltas — scaffold, validate, and merge spec-delta.md files into domain base specs.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Convene the Council of High Intelligence — multi-persona deliberation with historical thinkers for deeper analysis of complex problems.
Design Audit — multi-angle review of a detailed design against the actual codebase before implementation.
Mark a TDD design as complete — stamp completion, archive handoff.md, archive to three-pillars-docs/completed-tp-designs/, and optionally commit + open a PR merging the design branch back to the base branch.
Scaffold architecture.md, product_roadmap.md, and known_issues.md in three-pillars-docs/ from codebase analysis. Creates the three project docs that the TDD pipeline reads for context. Assumes three-pillars-docs/vision.md already exists — if missing, recommends /tp-setup first.
Read project docs and propose what to do next. Surfaces highest-impact work from roadmap, known issues, and in-flight designs.
Final audit of a completed plan — verify the full implementation against both design.md and detailed-design.md.
| name | tp-spec |
| description | Manage living spec deltas — scaffold, validate, and merge spec-delta.md files into domain base specs. |
| argument-hint | {add|validate|merge} <design-name> [--domain <domain>] |
Manage living spec deltas for a design: scaffold, validate, and merge spec-delta.md files into their domain base spec.
Argument: <design-name> (required) — must match an existing directory
under three-pillars-docs/tp-designs/. Design names use only [a-z0-9-]
characters; reject anything else before proceeding (see skills/_shared/validate-name.md).
Run first-run preflight per skills/_shared/first-run.md.
Dispatch to the subcommand — see §Subcommands below.
add <design>Scaffold a spec-delta.md in the design directory from the template.
Refuse-to-clobber: if spec-delta.md already exists it is left untouched
and the command exits 0 with a notice. In --auto mode this is a silent no-op.
/tp-spec add <design-name>
Creates: three-pillars-docs/tp-designs/<design>/spec-delta.md
Template: skills/tp-spec/templates/spec-delta.template.md
validate <design>Validate the design's spec-delta.md structurally, then run the drift scan
over the matching domain spec tree.
/tp-spec validate <design-name> [--domain <domain>]
Validator API (exact signature):
import sys
sys.path.insert(0, "$TP_ROOT/skills/_shared") # $TP_ROOT resolved per skills/_shared/first-run.md
from validate_artifact import validate_artifact
from pathlib import Path
verdict = validate_artifact("spec", Path(delta_path)) # type-first, Path arg
On BLOCKED: JSON verdict is printed to stderr and the command exits 1.
On PASS: runs spec_drift.py scan over three-pillars-docs/specs/ and exits
with its exit code (0 clean / 1 DRIFT).
The nonexistent .validate(text, type) signature is never used.
merge <design>Merge the design's spec-delta.md into the domain base spec via the engine.
/tp-spec merge <design-name> [--domain <domain>]
Engine call (exact signature):
from spec_delta import merge, MergeConflict, SpecParseError
merged_text = merge(base_text, [delta_text]) # base_text: str, list of delta str
MergeConflict or SpecParseError: base is not written; JSON verdict
is printed to stderr; exits 1 (refuse-on-conflict).spec-delta.md exists: no-op skip, exits 0.<design-name> when --domain is omitted.Reads: three-pillars-docs/tp-designs/<design>/spec-delta.md
Writes: three-pillars-docs/specs/<domain>/spec.md
| Code | Meaning |
|---|---|
| 0 | Success or no-op skip |
| 1 | BLOCKED / DRIFT / MergeConflict |
| 2 | Usage error |
Backend: skills/tp-spec/tp_spec.py
Template: skills/tp-spec/templates/spec-delta.template.md
Tests: skills/tp-spec/test_tp_spec.py
Depends on:
skills/_shared/validate_artifact.py — validate_artifact(type, path)skills/_shared/spec_delta.py — merge(base_text, deltas)skills/_shared/spec_drift.py — main(["scan", specs_dir, ...])