一键导入
tdk-workflow-config-apply
Interactively review and apply guarded .specify/.specify.json changes derived from workspace layout proposal JSON.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interactively review and apply guarded .specify/.specify.json changes derived from workspace layout proposal JSON.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
Primary implementation skill. Execute phases from plan.md ## Phases table. Read plan.md as source of truth for status + dependency graph.
Execute the implementation planning workflow using the plan template to generate design artifacts.
Create spec.md from a feature or child-slice description, or replay --interview against existing spec.md. Supports --fast, memory, and an embedded quality gate.
Project-level architecture recommendation and brownfield recovery advisor. Writes architecture reports only; does not mutate layout or config.
Deprecated compatibility route for /tdk-workspace-layout-propose.
| name | tdk-workflow-config-apply |
| description | Interactively review and apply guarded .specify/.specify.json changes derived from workspace layout proposal JSON. |
| argument-hint | [(no flags)|--dry-run|--reconcile|--yes --expect-hash <hash>] [--topology <path>] |
| metadata | {"version":"1.0.0"} |
Review and optionally apply an approved workspace layout proposal to TDK runtime config.
workspace-layout-proposal.json is the authoring proposal.workspace-topology.json remains a legacy fallback..specify/.specify.json is derived runtime config.planHash internally,
show the review summary, ask for confirmation, then apply the exact preview.--dry-run is preview-only and writes no files.--reconcile is report-only and implies preview; it does not need --dry-run.--yes --expect-hash <planHash>.--yes without --expect-hash exits 1. There is no single-shot apply.--expect-hash proves preview/apply consistency, not proposal authenticity..specify/configurations/workspace-layout/ or legacy topology files under .specify/configurations/workspace-topology/..specify/.specify.json is required. Missing JSON and YAML-only config exit 1 with guidance; first-time creation is deferred.--accept-overwrites after explicit user approval.backups/, are 0600, self-ignored by a writer-created .gitignore containing *, and retention-bounded.topology-apply-report.md contains redacted diagnostics plus a manual revert command..specify/.specify.json.--reconcile apply, directory creation, routing updates, force apply, revert subcommand, advanced backup management.$ARGUMENTS
Supported flags:
| Flag | Behavior |
|---|---|
| no flags | Recommended human flow: preview, review, confirm, then guarded apply with the parsed planHash. |
--dry-run | Preview only. Writes no files and stops after the summary. |
--topology <path> | Use a workspace layout proposal path or legacy topology path instead of auto-detecting. |
--reconcile | Brownfield reconciliation preview. Writes no config and never moves or renames folders. |
--yes | Automation apply for a previously previewed plan. Requires --expect-hash. |
--expect-hash <hash> | Hash from a prior dry-run JSON payload. Mandatory with --yes. |
--accept-overwrites | Allow confirmation findings only after explicit user approval. |
Default proposal path:
.specify/configurations/workspace-layout/workspace-layout-proposal.json
Legacy fallback when the new proposal file is missing:
.specify/configurations/workspace-topology/workspace-topology.json
Select mode:
| Input | Mode |
|---|---|
| no flags | interactive |
--dry-run without --yes | preview-only |
--reconcile without --yes | reconcile-preview |
--yes --expect-hash <hash> | automation-apply |
Reject directory-creation flags, source-move flags, source-rename flags, --force, and routing-update flags. Stop with a scoped-deferred message.
Reject --reconcile --yes; reconcile remains report-only.
Reject --yes without --expect-hash; tell the user to run either the no-flag
interactive flow or explicit --dry-run first.
Resolve TOPOLOGY_PATH from --topology <path> or use the default path above,
falling back to legacy topology when the new proposal file is absent.
Use <agent-resolved-project-root> from the active coding harness/session.
Ask the user for the project root if it cannot be identified confidently; do not pass the placeholder literally.
bash -lc '
PROJECT_DIR="$1"
TOPOLOGY_PATH="$2"
RECONCILE_MODE="$3"
if [ -z "$PROJECT_DIR" ] || [ ! -d "$PROJECT_DIR/.specify/scripts/ts" ]; then
echo "Invalid project root: $PROJECT_DIR" >&2
exit 1
fi
case "$TOPOLOGY_PATH" in
/*) TOPOLOGY_ARG="$TOPOLOGY_PATH" ;;
*) TOPOLOGY_ARG="$PROJECT_DIR/$TOPOLOGY_PATH" ;;
esac
EXTRA_ARGS=()
if [ "$RECONCILE_MODE" = "yes" ]; then
EXTRA_ARGS+=(--reconcile)
fi
(cd "$PROJECT_DIR/.specify/scripts/ts" && bun src/index.ts config topology apply --dry-run --topology "$TOPOLOGY_ARG" "${EXTRA_ARGS[@]}")
' -- "<agent-resolved-project-root>" "{TOPOLOGY_PATH}" "{yes|no}"
If the command exits non-zero, stop and report the stderr/stdout summary. Do not retry with writes or hand-edit config.
Parse the single JSON stdout object. Capture:
planHashapplyEligiblerequiresConfirmationconfirmationFindingsdiffwarningsDo not transcribe planHash by eye; parse it from JSON.
Show a concise review summary before any write:
diffIn preview-only or reconcile-preview mode, stop here. Do not ask for apply
confirmation.
If applyEligible is not true, do not apply. Explain that only layout proposal
files under .specify/configurations/workspace-layout/ or legacy topology files
under .specify/configurations/workspace-topology/ can be applied.
If requiresConfirmation is true, show confirmationFindings and ask the user for explicit approval before passing --accept-overwrites.
In interactive mode, ask:
Apply this workflow config patch to `.specify/.specify.json`?
If the user declines, stop after the preview and write no files.
In interactive mode, use the parsed planHash from Step 2. Do not make the
user copy it manually.
In automation-apply mode, skip Steps 2 and 3 and call the CLI with the
provided --expect-hash value.
bash -lc '
PROJECT_DIR="$1"
TOPOLOGY_PATH="$2"
PLAN_HASH="$3"
ACCEPT_OVERWRITES="$4"
case "$TOPOLOGY_PATH" in
/*) TOPOLOGY_ARG="$TOPOLOGY_PATH" ;;
*) TOPOLOGY_ARG="$PROJECT_DIR/$TOPOLOGY_PATH" ;;
esac
EXTRA_ARGS=()
if [ "$ACCEPT_OVERWRITES" = "yes" ]; then
EXTRA_ARGS+=(--accept-overwrites)
fi
(cd "$PROJECT_DIR/.specify/scripts/ts" && bun src/index.ts config topology apply --topology "$TOPOLOGY_ARG" --yes --expect-hash "$PLAN_HASH" "${EXTRA_ARGS[@]}")
' -- "<agent-resolved-project-root>" "{TOPOLOGY_PATH}" "{PLAN_HASH}" "{yes|no}"
If the command exits non-zero, report the exit code and stderr summary. Exit 2 means the dry-run preview is stale; rerun dry-run before applying again.
When --reconcile is present, stay in reconcile-preview mode:
subWorkspaces[] and modules[]./tdk-workflow-config-apply; automation
can still use --dry-run followed by --yes --expect-hash.Reconcile is observe/report only. It does not move, rename, create, or delete source folders.
Show:
applyEligibleplanHash only when useful for automation/debug; do not make it the primary
user action in default mode--yes always includes a parsed --expect-hash.--accept-overwrites is passed only after explicit user approval.