Skip to content

Commit bb0c551

Browse files
committed
chore: track Spec Kit tooling
1 parent 3ff2fd8 commit bb0c551

19 files changed

Lines changed: 2545 additions & 0 deletions

‎.gitignore‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,13 @@ TestResults/
5555
.codex/skills
5656
skills-lock.json
5757
scratchpad/
58+
59+
## Spec Kit tooling (regenerated by `specify init`; keep only shared governance artifacts)
60+
.specify/*
61+
!.specify/.gitignore
62+
!.specify/init-options.json
63+
!.specify/integrations/
64+
!.specify/memory/
65+
!.specify/scripts/
66+
!.specify/templates/
67+
!.specify/workflows/

‎.specify/.gitignore‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Machine-local Spec Kit state — not meant to be shared.
2+
# Managed by the Specify CLI; safe to edit (your changes are preserved on refresh).
3+
4+
# Local pointer to the current feature directory. Rewritten every time you
5+
# switch features, so it is per-checkout state rather than something to share.
6+
feature.json
7+
8+
# Per-machine extension config overrides.
9+
extensions/*/local-config.yml
10+
11+
# Active harness selection; rewritten whenever a machine runs `specify init
12+
# --integration <harness>`, so it is per-checkout state rather than shared.
13+
integration.json

‎.specify/init-options.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"ai": "codex",
3+
"ai_skills": true,
4+
"feature_numbering": "sequential",
5+
"here": true,
6+
"integration": "codex",
7+
"script": "sh",
8+
"speckit_version": "1.0.3.dev0"
9+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"integration": "codex",
3+
"version": "1.0.3.dev0",
4+
"installed_at": "2026-09-01T03:12:53.517146+00:00",
5+
"files": {
6+
".agents/skills/speckit-analyze/SKILL.md": "a84a54c4701706a711bf23c59817bc659bd6e484488fd7402a908496992af217",
7+
".agents/skills/speckit-clarify/SKILL.md": "d3aa120d6b5d7718c4c6d792dd41bee66254bd4bb82f88f3067f1d1c4e9d2dc2",
8+
".agents/skills/speckit-constitution/SKILL.md": "01074220f2b4bb32a92b8ad23a688358bd5e3828e18871b21a32ff8db6753358",
9+
".agents/skills/speckit-implement/SKILL.md": "d113f4e09878a8a2e7f64b3852d698076a38394b8fc777b7426b1159c28e92fe",
10+
".agents/skills/speckit-converge/SKILL.md": "466e51121a590e3abd409fda063db6361c9a7e2b2cef927a75f5afb130c1eb88",
11+
".agents/skills/speckit-plan/SKILL.md": "b3dca1c679a2452e8e3aa84c96b42fc5cee42e8b0cb3c30fa77a60ff83db6d4d",
12+
".agents/skills/speckit-checklist/SKILL.md": "6632a53c5ddbde330c7ca3a8d19459b4de866ea5296028c2178f7b4598243d78",
13+
".agents/skills/speckit-specify/SKILL.md": "88d7fab201de66297f16b6c271a418a0f2c198d714456dfd707e623348ec47c1",
14+
".agents/skills/speckit-tasks/SKILL.md": "1ae03ee3aac56f19cac4cba8d51c672e4f50692f5a179f8fb65a035752e71592",
15+
".agents/skills/speckit-taskstoissues/SKILL.md": "542bf370046ecc2dbea0a539522e0628bee7a425b47b8afb0bd67ae274c01720"
16+
}
17+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"integration": "speckit",
3+
"version": "1.0.3.dev0",
4+
"installed_at": "2026-09-01T03:12:53.525158+00:00",
5+
"files": {
6+
".specify/scripts/bash/create-new-feature.sh": "fe99ea8da184380056ce8512ca5d37f67fb499ee4234835c15dcf7c4fb75451c",
7+
".specify/scripts/bash/resolve-template.sh": "829e227096abc8bf0889889ec9f792f503ca5d395b7836a8a7eb739ee75214e7",
8+
".specify/scripts/bash/setup-plan.sh": "061cec0c6d71f8f88008b4d3d7f5bbc2bfbdb85d734d9e73fc5f07a3c60c88a6",
9+
".specify/scripts/bash/setup-tasks.sh": "0350b2def158c4dc333cd888fc5a3b10785b3d5c2cf936f93e910242ea9d507d",
10+
".specify/scripts/bash/check-prerequisites.sh": "d918a297a3d8f4fc864d04ad7d4f35626f2b136ff9d5a3ad13a0591253408fde",
11+
".specify/scripts/bash/common.sh": "c552063e4c18818b6f6a924a0b638835a8bcb6bd166053b103cc1ef5096f6525",
12+
".specify/templates/checklist-template.md": "70bbc48e884fab372ffb09e83e78ff983e28b69caebf8cd9964a02b6836683ac",
13+
".specify/templates/constitution-template.md": "ce7549540fa45543cca797a150201d868e64495fdff39dc38246fb17bd4024b3",
14+
".specify/templates/plan-template.md": "a828ad6206526574ab3fc99be6d0154588cb1c9774c5919d71b81ab5b2dbffa0",
15+
".specify/templates/spec-template.md": "3945437fc35cd30a5b2bf7beea680337c3516826d3efa5a6b92c4a7eca1ba28e",
16+
".specify/templates/tasks-template.md": "b0f527d41e546af0c31903e04f9b20965b6b497b573792198f663a64ce128863",
17+
".specify/.gitignore": "8c908410d177a1ef3d0dee16d7ad55f2ac3333df3104c4d4adee1c9b82f1dbc1"
18+
}
19+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"sha256": "ce7549540fa45543cca797a150201d868e64495fdff39dc38246fb17bd4024b3",
3+
"source": "core"
4+
}
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
#!/usr/bin/env bash
2+
3+
# Consolidated prerequisite checking script
4+
#
5+
# This script provides unified prerequisite checking for Spec-Driven Development workflow.
6+
# It replaces the functionality previously spread across multiple scripts.
7+
#
8+
# Usage: ./check-prerequisites.sh [OPTIONS]
9+
#
10+
# OPTIONS:
11+
# --json Output in JSON format
12+
# --require-tasks Require tasks.md to exist (for implementation phase)
13+
# --include-tasks Include tasks.md in AVAILABLE_DOCS list
14+
# --paths-only Only output path variables (no validation)
15+
# --template NAME Include composed template content in JSON output
16+
# --help, -h Show help message
17+
#
18+
# OUTPUTS:
19+
# JSON mode: {"FEATURE_DIR":"...", "AVAILABLE_DOCS":["..."]}
20+
# Text mode: FEATURE_DIR:... \n AVAILABLE_DOCS: \n ✓/✗ file.md
21+
# Paths only: REPO_ROOT: ... \n BRANCH: ... \n FEATURE_DIR: ... etc.
22+
23+
set -e
24+
25+
# Parse command line arguments
26+
JSON_MODE=false
27+
REQUIRE_TASKS=false
28+
INCLUDE_TASKS=false
29+
PATHS_ONLY=false
30+
TEMPLATE_NAME=""
31+
32+
while [[ $# -gt 0 ]]; do
33+
case "$1" in
34+
--json)
35+
JSON_MODE=true
36+
;;
37+
--require-tasks)
38+
REQUIRE_TASKS=true
39+
;;
40+
--include-tasks)
41+
INCLUDE_TASKS=true
42+
;;
43+
--paths-only)
44+
PATHS_ONLY=true
45+
;;
46+
--template)
47+
shift
48+
if [[ $# -eq 0 ]]; then
49+
echo "ERROR: --template requires a template name" >&2
50+
exit 1
51+
fi
52+
TEMPLATE_NAME="$1"
53+
;;
54+
--help|-h)
55+
cat << 'EOF'
56+
Usage: check-prerequisites.sh [OPTIONS]
57+
58+
Consolidated prerequisite checking for Spec-Driven Development workflow.
59+
60+
OPTIONS:
61+
--json Output in JSON format
62+
--require-tasks Require tasks.md to exist (for implementation phase)
63+
--include-tasks Include tasks.md in AVAILABLE_DOCS list
64+
--paths-only Only output path variables (no prerequisite validation)
65+
--template NAME Include composed template content in JSON output
66+
--help, -h Show this help message
67+
68+
EXAMPLES:
69+
# Check task prerequisites (plan.md required)
70+
./check-prerequisites.sh --json
71+
72+
# Check implementation prerequisites (plan.md + tasks.md required)
73+
./check-prerequisites.sh --json --require-tasks --include-tasks
74+
75+
# Get feature paths only (no validation)
76+
./check-prerequisites.sh --paths-only
77+
78+
EOF
79+
exit 0
80+
;;
81+
*)
82+
echo "ERROR: Unknown option '$1'. Use --help for usage information." >&2
83+
exit 1
84+
;;
85+
esac
86+
shift
87+
done
88+
89+
# Source common functions
90+
SCRIPT_DIR="$(CDPATH="" cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
91+
source "$SCRIPT_DIR/common.sh"
92+
93+
# Get feature paths.
94+
# In --paths-only mode this is pure resolution, so pass --no-persist to opt out
95+
# of the feature.json write side effect (issue #3025).
96+
if $PATHS_ONLY; then
97+
_paths_output=$(get_feature_paths --no-persist) || { echo "ERROR: Failed to resolve feature paths" >&2; exit 1; }
98+
else
99+
_paths_output=$(get_feature_paths) || { echo "ERROR: Failed to resolve feature paths" >&2; exit 1; }
100+
fi
101+
eval "$_paths_output"
102+
unset _paths_output
103+
104+
# If paths-only mode, output paths and exit (no validation)
105+
if $PATHS_ONLY; then
106+
if $JSON_MODE; then
107+
# Minimal JSON paths payload (no validation performed)
108+
if has_jq; then
109+
jq -cn \
110+
--arg repo_root "$REPO_ROOT" \
111+
--arg branch "$CURRENT_BRANCH" \
112+
--arg feature_dir "$FEATURE_DIR" \
113+
--arg feature_spec "$FEATURE_SPEC" \
114+
--arg impl_plan "$IMPL_PLAN" \
115+
--arg tasks "$TASKS" \
116+
'{REPO_ROOT:$repo_root,BRANCH:$branch,FEATURE_DIR:$feature_dir,FEATURE_SPEC:$feature_spec,IMPL_PLAN:$impl_plan,TASKS:$tasks}'
117+
else
118+
printf '{"REPO_ROOT":"%s","BRANCH":"%s","FEATURE_DIR":"%s","FEATURE_SPEC":"%s","IMPL_PLAN":"%s","TASKS":"%s"}\n' \
119+
"$(json_escape "$REPO_ROOT")" "$(json_escape "$CURRENT_BRANCH")" "$(json_escape "$FEATURE_DIR")" "$(json_escape "$FEATURE_SPEC")" "$(json_escape "$IMPL_PLAN")" "$(json_escape "$TASKS")"
120+
fi
121+
else
122+
echo "REPO_ROOT: $REPO_ROOT"
123+
echo "BRANCH: $CURRENT_BRANCH"
124+
echo "FEATURE_DIR: $FEATURE_DIR"
125+
echo "FEATURE_SPEC: $FEATURE_SPEC"
126+
echo "IMPL_PLAN: $IMPL_PLAN"
127+
echo "TASKS: $TASKS"
128+
fi
129+
exit 0
130+
fi
131+
132+
# Validate required directories and files
133+
if [[ ! -d "$FEATURE_DIR" ]]; then
134+
echo "ERROR: Feature directory not found: $FEATURE_DIR" >&2
135+
echo "Run \$speckit-specify first to create the feature structure." >&2
136+
exit 1
137+
fi
138+
139+
if [[ ! -f "$IMPL_PLAN" ]]; then
140+
echo "ERROR: plan.md not found in $FEATURE_DIR" >&2
141+
echo "Run \$speckit-plan first to create the implementation plan." >&2
142+
exit 1
143+
fi
144+
145+
# Check for tasks.md if required
146+
if $REQUIRE_TASKS && [[ ! -f "$TASKS" ]]; then
147+
echo "ERROR: tasks.md not found in $FEATURE_DIR" >&2
148+
echo "Run \$speckit-tasks first to create the task list." >&2
149+
exit 1
150+
fi
151+
152+
# Build list of available documents
153+
docs=()
154+
155+
# Always check these optional docs
156+
[[ -f "$RESEARCH" ]] && docs+=("research.md")
157+
[[ -f "$DATA_MODEL" ]] && docs+=("data-model.md")
158+
159+
# Check contracts directory (only if it exists and has files)
160+
if [[ -d "$CONTRACTS_DIR" ]] && [[ -n "$(ls -A "$CONTRACTS_DIR" 2>/dev/null)" ]]; then
161+
docs+=("contracts/")
162+
fi
163+
164+
[[ -f "$QUICKSTART" ]] && docs+=("quickstart.md")
165+
166+
# Include tasks.md if requested and it exists
167+
if $INCLUDE_TASKS && [[ -f "$TASKS" ]]; then
168+
docs+=("tasks.md")
169+
fi
170+
171+
TEMPLATE_CONTENT=""
172+
if [[ -n "$TEMPLATE_NAME" ]]; then
173+
if TEMPLATE_CONTENT=$(resolve_template_content "$TEMPLATE_NAME" "$REPO_ROOT"; status=$?; printf x; exit "$status"); then
174+
TEMPLATE_CONTENT="${TEMPLATE_CONTENT%x}"
175+
else
176+
echo "ERROR: Could not resolve required $TEMPLATE_NAME from the template override stack for $REPO_ROOT" >&2
177+
exit 1
178+
fi
179+
fi
180+
181+
# Output results
182+
if $JSON_MODE; then
183+
# Build JSON array of documents
184+
if has_jq; then
185+
if [[ ${#docs[@]} -eq 0 ]]; then
186+
json_docs="[]"
187+
else
188+
json_docs=$(printf '%s\n' "${docs[@]}" | jq -R . | jq -s .)
189+
fi
190+
if [[ -n "$TEMPLATE_NAME" ]]; then
191+
jq -cn \
192+
--arg feature_dir "$FEATURE_DIR" \
193+
--argjson docs "$json_docs" \
194+
--arg template_content "$TEMPLATE_CONTENT" \
195+
'{FEATURE_DIR:$feature_dir,AVAILABLE_DOCS:$docs,TEMPLATE_CONTENT:$template_content}'
196+
else
197+
jq -cn \
198+
--arg feature_dir "$FEATURE_DIR" \
199+
--argjson docs "$json_docs" \
200+
'{FEATURE_DIR:$feature_dir,AVAILABLE_DOCS:$docs}'
201+
fi
202+
else
203+
if [[ ${#docs[@]} -eq 0 ]]; then
204+
json_docs="[]"
205+
else
206+
json_docs=$(for d in "${docs[@]}"; do printf '"%s",' "$(json_escape "$d")"; done)
207+
json_docs="[${json_docs%,}]"
208+
fi
209+
if [[ -n "$TEMPLATE_NAME" ]]; then
210+
printf '{"FEATURE_DIR":"%s","AVAILABLE_DOCS":%s,"TEMPLATE_CONTENT":"%s"}\n' \
211+
"$(json_escape "$FEATURE_DIR")" "$json_docs" "$(json_escape "$TEMPLATE_CONTENT")"
212+
else
213+
printf '{"FEATURE_DIR":"%s","AVAILABLE_DOCS":%s}\n' "$(json_escape "$FEATURE_DIR")" "$json_docs"
214+
fi
215+
fi
216+
else
217+
# Text output
218+
echo "FEATURE_DIR:$FEATURE_DIR"
219+
echo "AVAILABLE_DOCS:"
220+
221+
# Show status of each potential document
222+
check_file "$RESEARCH" "research.md"
223+
check_file "$DATA_MODEL" "data-model.md"
224+
check_dir "$CONTRACTS_DIR" "contracts/"
225+
check_file "$QUICKSTART" "quickstart.md"
226+
227+
if $INCLUDE_TASKS; then
228+
check_file "$TASKS" "tasks.md"
229+
fi
230+
fi

0 commit comments

Comments
 (0)