specpilot 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/add-specs.d.ts.map +1 -1
- package/dist/commands/add-specs.js +1 -3
- package/dist/commands/add-specs.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +1 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/refine.d.ts.map +1 -1
- package/dist/commands/refine.js +1 -3
- package/dist/commands/refine.js.map +1 -1
- package/dist/core/agentConfig.d.ts +9 -0
- package/dist/core/agentConfig.d.ts.map +1 -0
- package/dist/{utils/agentConfigGenerator.js → core/agentConfig.js} +29 -44
- package/dist/core/agentConfig.js.map +1 -0
- package/dist/core/ideConfig.d.ts +35 -0
- package/dist/core/ideConfig.d.ts.map +1 -0
- package/dist/core/ideConfig.js +287 -0
- package/dist/core/ideConfig.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +22 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/render.d.ts +73 -0
- package/dist/core/render.d.ts.map +1 -0
- package/dist/core/render.js +99 -0
- package/dist/core/render.js.map +1 -0
- package/dist/core/slashCommands.d.ts +23 -0
- package/dist/core/slashCommands.d.ts.map +1 -0
- package/dist/core/slashCommands.js +524 -0
- package/dist/core/slashCommands.js.map +1 -0
- package/dist/core/specFiles.d.ts +18 -0
- package/dist/core/specFiles.d.ts.map +1 -0
- package/dist/{utils/specFileGenerator.js → core/specFiles.js} +207 -136
- package/dist/core/specFiles.js.map +1 -0
- package/dist/core/templateEngine.d.ts +69 -0
- package/dist/core/templateEngine.d.ts.map +1 -0
- package/dist/{utils → core}/templateEngine.js +108 -6
- package/dist/core/templateEngine.js.map +1 -0
- package/dist/utils/ideConfigGenerator.d.ts +5 -29
- package/dist/utils/ideConfigGenerator.d.ts.map +1 -1
- package/dist/utils/ideConfigGenerator.js +9 -282
- package/dist/utils/ideConfigGenerator.js.map +1 -1
- package/dist/utils/slashCommandGenerator.d.ts +3 -17
- package/dist/utils/slashCommandGenerator.d.ts.map +1 -1
- package/dist/utils/slashCommandGenerator.js +8 -514
- package/dist/utils/slashCommandGenerator.js.map +1 -1
- package/dist/utils/specGenerator.d.ts +11 -46
- package/dist/utils/specGenerator.d.ts.map +1 -1
- package/dist/utils/specGenerator.js +30 -63
- package/dist/utils/specGenerator.js.map +1 -1
- package/dist/utils/specSetup.d.ts.map +1 -1
- package/dist/utils/specSetup.js +3 -4
- package/dist/utils/specSetup.js.map +1 -1
- package/package.json +1 -1
- package/dist/utils/agentConfigGenerator.d.ts +0 -17
- package/dist/utils/agentConfigGenerator.d.ts.map +0 -1
- package/dist/utils/agentConfigGenerator.js.map +0 -1
- package/dist/utils/specFileGenerator.d.ts +0 -30
- package/dist/utils/specFileGenerator.d.ts.map +0 -1
- package/dist/utils/specFileGenerator.js.map +0 -1
- package/dist/utils/templateEngine.d.ts +0 -35
- package/dist/utils/templateEngine.d.ts.map +0 -1
- package/dist/utils/templateEngine.js.map +0 -1
|
@@ -5,483 +5,8 @@ const crypto_1 = require("crypto");
|
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
const fs_1 = require("fs");
|
|
7
7
|
const ideConfigGenerator_1 = require("./ideConfigGenerator");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* CS-087.
|
|
11
|
-
*/
|
|
12
|
-
exports.SLASH_COMMANDS = [
|
|
13
|
-
{
|
|
14
|
-
name: 'status',
|
|
15
|
-
description: 'Show current sprint status and next milestone at a glance',
|
|
16
|
-
body: `Give a one-screen status summary of the current sprint.
|
|
17
|
-
|
|
18
|
-
1. Read \`.specs/planning/tasks.md\` and extract the \`## Current Sprint\` section — list each item's ID and a short (<15 word) restatement.
|
|
19
|
-
2. Read \`.specs/planning/roadmap.md\` and find the \`## Milestones\` section — identify the next incomplete milestone.
|
|
20
|
-
3. Present a compact summary with two headings:
|
|
21
|
-
- **Current Sprint**: bullet list of \`[CS-###] [BL-###]\` items with their short restatement.
|
|
22
|
-
- **Next Milestone**: the next unchecked milestone from roadmap.md.
|
|
23
|
-
|
|
24
|
-
Keep it to one screen — do not re-print full task descriptions, just IDs and short summaries.`,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'reanchor',
|
|
28
|
-
description: 'Restore full project context after losing it mid-session',
|
|
29
|
-
body: `Restore operating context for this project.
|
|
30
|
-
|
|
31
|
-
1. Read \`.specs/project/project.yaml\` in full.
|
|
32
|
-
2. Read the \`## Re-Anchor Prompt\` section of \`.specs/development/prompts.md\` verbatim.
|
|
33
|
-
3. Restate both as your current operating context for the rest of this session — project identity, stack, rules, and the Re-Anchor Prompt's guidance.
|
|
34
|
-
|
|
35
|
-
Do not summarize or paraphrase away detail; this command exists specifically to recover full context, not an abbreviated version of it.`,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
name: 'report',
|
|
39
|
-
description: 'Run the Spec-First review gate: classify the change, update specs, then wait for confirmation before coding',
|
|
40
|
-
body: `Formalize the Spec-First review gate (mandate 8) for the pending change.
|
|
41
|
-
|
|
42
|
-
1. Classify the pending change as trivial, feature, or architectural:
|
|
43
|
-
- Trivial: no spec update required.
|
|
44
|
-
- Feature: touches \`project/requirements.md\` and \`planning/tasks.md\`.
|
|
45
|
-
- Architectural: touches all affected spec files plus \`CHANGELOG.md\`.
|
|
46
|
-
2. Read the relevant \`.specs/\` files per the Context routing table (session start → \`project/project.yaml\`; feature/bug → + \`project/requirements.md\`, \`planning/tasks.md\`; architecture → + \`architecture/architecture.md\`; tests → + \`quality/tests.md\`; security → + \`security/threat-model.md\`, \`security/security-decisions.md\`; planning → + \`planning/tasks.md\`, \`planning/roadmap.md\`).
|
|
47
|
-
3. Update the affected spec files first — before writing any code.
|
|
48
|
-
4. Present a Spec Report: classification, files touched, what changed in each, and what the specs now say.
|
|
49
|
-
5. Wait for the user's literal \`yes, proceed\` before writing or editing any code or non-spec file. An ambiguous "ok" or "sure" is not sufficient for an architectural-tier change — ask for the explicit phrase if it wasn't given.`,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: 'sync',
|
|
53
|
-
description: 'Compare .specs/ against actual project state and propose fixes for drift',
|
|
54
|
-
body: `Find and fix drift between \`.specs/\` and the real project.
|
|
55
|
-
|
|
56
|
-
1. Read \`.specs/architecture/architecture.md\`, \`.specs/project/requirements.md\`, and \`.specs/quality/tests.md\`.
|
|
57
|
-
2. Compare their claims against the actual \`src/\` structure and \`package.json\` (versions, dependencies, scripts).
|
|
58
|
-
3. List concrete discrepancies: stale version numbers, renamed or removed files/modules still referenced, undocumented modules that exist in \`src/\` but aren't mentioned in the specs, stale command or test-suite lists.
|
|
59
|
-
4. Propose specific per-file edits to close each discrepancy — do not just describe the problem, show the fix.
|
|
60
|
-
5. Wait for the user's confirmation before writing any of the proposed edits.
|
|
61
|
-
|
|
62
|
-
This is a judgment/comparison task, not a mechanical one — do not attempt to script the diff; read and reason about each file.`,
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: 'refine',
|
|
66
|
-
description: 'Refine .specs/ requirements from a new requirement description, with a diff preview before writing',
|
|
67
|
-
argumentHint: '<description>',
|
|
68
|
-
body: `Refine the project's spec files with a new requirement.
|
|
69
|
-
|
|
70
|
-
Requirement description: $ARGUMENTS
|
|
71
|
-
|
|
72
|
-
1. Read the current \`.specs/project/requirements.md\`, \`.specs/development/context.md\`, and \`.specs/development/prompts.md\`.
|
|
73
|
-
2. Propose specific additions or edits to those files that incorporate the requirement description above, following the existing stable-ID conventions (e.g. \`REQ-###.#\`).
|
|
74
|
-
3. Show a line-level diff preview of every proposed change — do not just describe it.
|
|
75
|
-
4. Wait for the user's confirmation before writing anything.
|
|
76
|
-
5. Once confirmed, write the changes.
|
|
77
|
-
|
|
78
|
-
This mirrors the CLI's \`specpilot refine\` (REQ-002.A.6) as a standalone agent workflow — it has no dependency on the CLI being installed.`,
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: 'validate',
|
|
82
|
-
description: 'Validate .specs/ structure, front-matter, and cross-references; suggest fixes without auto-applying',
|
|
83
|
-
allowedTools: ['Bash', 'Read'],
|
|
84
|
-
body: `Validate the project's \`.specs/\` files. Run the script below, then summarize the results in plain language.
|
|
85
|
-
|
|
86
|
-
\`\`\`bash
|
|
87
|
-
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
88
|
-
|
|
89
|
-
REQUIRED_FILES=(
|
|
90
|
-
".specs/project/project.yaml"
|
|
91
|
-
".specs/architecture/architecture.md"
|
|
92
|
-
".specs/project/requirements.md"
|
|
93
|
-
".specs/architecture/api.yaml"
|
|
94
|
-
".specs/quality/tests.md"
|
|
95
|
-
".specs/planning/tasks.md"
|
|
96
|
-
".specs/development/context.md"
|
|
97
|
-
".specs/development/prompts.md"
|
|
98
|
-
".specs/security/threat-model.md"
|
|
99
|
-
".specs/security/security-decisions.md"
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
echo "== Missing required files =="
|
|
103
|
-
missing=0
|
|
104
|
-
for f in "\${REQUIRED_FILES[@]}"; do
|
|
105
|
-
if [ ! -f "$f" ]; then echo "MISSING: $f"; missing=1; fi
|
|
106
|
-
done
|
|
107
|
-
[ "$missing" -eq 0 ] && echo "none"
|
|
108
|
-
|
|
109
|
-
echo
|
|
110
|
-
echo "== Front-matter field checks (fileID, lastUpdated, version, contributors, relatedFiles) =="
|
|
111
|
-
clean=1
|
|
112
|
-
for f in "\${REQUIRED_FILES[@]}"; do
|
|
113
|
-
[[ "$f" == *.md ]] || continue
|
|
114
|
-
[ -f "$f" ] || continue
|
|
115
|
-
fm=$(sed -n '2,/^---$/p' "$f")
|
|
116
|
-
for field in fileID lastUpdated version contributors relatedFiles; do
|
|
117
|
-
if ! echo "$fm" | grep -q "^\${field}:"; then
|
|
118
|
-
echo "MISSING $field in $f"
|
|
119
|
-
clean=0
|
|
120
|
-
fi
|
|
121
|
-
done
|
|
122
|
-
done
|
|
123
|
-
[ "$clean" -eq 1 ] && echo "all fields present"
|
|
124
|
-
|
|
125
|
-
echo
|
|
126
|
-
echo "== relatedFiles cross-reference check =="
|
|
127
|
-
clean=1
|
|
128
|
-
for f in "\${REQUIRED_FILES[@]}"; do
|
|
129
|
-
[[ "$f" == *.md ]] || continue
|
|
130
|
-
[ -f "$f" ] || continue
|
|
131
|
-
refs=$(sed -n '2,/^---$/p' "$f" | sed -n '/^relatedFiles:/,/^[a-zA-Z]/p' | grep -oE '[A-Za-z0-9_.-]+\\.(md|yaml)')
|
|
132
|
-
for ref in $refs; do
|
|
133
|
-
if ! find .specs -name "$ref" | grep -q .; then
|
|
134
|
-
echo "BROKEN REF in $f -> $ref (not found anywhere under .specs/)"
|
|
135
|
-
clean=0
|
|
136
|
-
fi
|
|
137
|
-
done
|
|
138
|
-
done
|
|
139
|
-
[ "$clean" -eq 1 ] && echo "all cross-references resolve"
|
|
140
|
-
\`\`\`
|
|
141
|
-
|
|
142
|
-
Never eyeball line counts or fingerprints by hand where this script already computes them exactly.
|
|
143
|
-
|
|
144
|
-
After running it:
|
|
145
|
-
1. Summarize each of the three sections in plain language (what's missing, what's wrong, what's broken).
|
|
146
|
-
2. For every issue found, suggest a specific fix — but never apply it automatically. Wait for the user to ask before editing any file.
|
|
147
|
-
3. If everything passes, say so plainly; do not manufacture issues.
|
|
148
|
-
|
|
149
|
-
**Known platform limitation**: GitHub Copilot only executes terminal commands in "agent mode." Outside agent mode, this command degrades to prose-only — read the files yourself and reason about the same three checks without the script, which carries a higher error rate than the scripted version.`,
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
name: 'archive',
|
|
153
|
-
description: 'Archive oversized .specs/ files (tasks.md Completed section, prompts.md) with a branch safety guard',
|
|
154
|
-
allowedTools: ['Bash', 'Read', 'Edit'],
|
|
155
|
-
body: `Archive oversized \`.specs/\` files: \`.specs/planning/tasks.md\`'s \`## Completed\` section beyond 40 lines, and \`.specs/development/prompts.md\` beyond 100 total lines.
|
|
156
|
-
|
|
157
|
-
Run the script below — it computes thresholds and moves lines deterministically. Do not hand-count lines or decide what to move yourself; the script's arithmetic is the source of truth.
|
|
158
|
-
|
|
159
|
-
\`\`\`bash
|
|
160
|
-
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
161
|
-
|
|
162
|
-
PROMPTS_LINE_LIMIT=100
|
|
163
|
-
PROMPTS_KEEP_LINES=80
|
|
164
|
-
COMPLETED_LINE_LIMIT=40
|
|
165
|
-
COMPLETED_KEEP_ENTRIES=20
|
|
166
|
-
|
|
167
|
-
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
|
|
168
|
-
if [ -n "$branch" ] && [ "$branch" != "main" ] && [ "$branch" != "master" ]; then
|
|
169
|
-
echo "WARNING: on branch '$branch'. Archive is recommended only on the default branch after merging."
|
|
170
|
-
read -p "Continue? [y/N] " confirm
|
|
171
|
-
if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then
|
|
172
|
-
echo "Archive cancelled."
|
|
173
|
-
exit 0
|
|
174
|
-
fi
|
|
175
|
-
fi
|
|
176
|
-
|
|
177
|
-
timestamp() { date -u +"%Y-%m-%d %H:%M:%S"; }
|
|
178
|
-
|
|
179
|
-
archive_prompts() {
|
|
180
|
-
local file=".specs/development/prompts.md"
|
|
181
|
-
local archive=".specs/development/prompts-archive.md"
|
|
182
|
-
[ -f "$file" ] || return 0
|
|
183
|
-
|
|
184
|
-
# Mirrors the CLI's planPromptsArchive() line for line. The log is the list under
|
|
185
|
-
# "## Latest Entries", else the table under "## Prompt History". Each entry's date is the
|
|
186
|
-
# last "Month D, YYYY", "Mon. D, YYYY" or "YYYY-MM-DD" in it (a table row: its Date cell).
|
|
187
|
-
# All dated entries must run one way; the oldest whole entries then move until the file
|
|
188
|
-
# is within PROMPTS_KEEP_LINES, keeping at least one. Line counts use the CLI's arithmetic
|
|
189
|
-
# (wc -l + 1). Prints "MOVE <first> <last> <header>" (1-based lines; header 0 for a list),
|
|
190
|
-
# "REFUSE <reason>", or nothing.
|
|
191
|
-
local plan
|
|
192
|
-
plan=$(LC_ALL=C awk -v total="$(wc -l < "$file")" -v limit="$PROMPTS_LINE_LIMIT" -v keep="$PROMPTS_KEEP_LINES" '
|
|
193
|
-
function trim(s) { sub(/^[ \\t\\r]+/, "", s); sub(/[ \\t\\r]+$/, "", s); return s }
|
|
194
|
-
function word(c) { return c ~ /[A-Za-z0-9_]/ }
|
|
195
|
-
function iso(k) { return sprintf("%04d-%02d-%02d", int(k / 10000), int(k / 100) % 100, k % 100) }
|
|
196
|
-
function lastdate(s, key, pos, a, b, t, p, m, y, mo, d) {
|
|
197
|
-
key = 0; pos = 0
|
|
198
|
-
while (match(substr(s, pos + 1), /(January|February|March|April|May|June|July|August|September|October|November|December|Sept|Jan|Feb|Mar|Apr|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\.? [0-9][0-9]?, [0-9][0-9][0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/)) {
|
|
199
|
-
a = pos + RSTART; b = a + RLENGTH; t = substr(s, a, RLENGTH)
|
|
200
|
-
# a > 1 guard: on macOS awk substr(s, 0, 1) returns the first character, not ""
|
|
201
|
-
if ((a > 1 && word(substr(s, a - 1, 1))) || word(substr(s, b, 1))) { pos = a; continue }
|
|
202
|
-
if (t ~ /^[0-9]/) { y = substr(t, 1, 4) + 0; mo = substr(t, 6, 2) + 0; d = substr(t, 9, 2) + 0 }
|
|
203
|
-
else { split(t, p, " "); m = p[1]; sub(/\\.$/, "", m); mo = MON[tolower(m)]; d = p[2] + 0; y = p[3] + 0 }
|
|
204
|
-
if (mo >= 1 && mo <= 12 && d >= 1 && d <= 31) key = y * 10000 + mo * 100 + d
|
|
205
|
-
pos = b - 1
|
|
206
|
-
}
|
|
207
|
-
return key
|
|
208
|
-
}
|
|
209
|
-
function excerpt(s, t, i, c, n, out) {
|
|
210
|
-
t = trim(s); n = 0; out = ""
|
|
211
|
-
for (i = 1; i <= length(t); i++) {
|
|
212
|
-
c = substr(t, i, 1)
|
|
213
|
-
if (ORD[c] < 128 || ORD[c] >= 192) n++
|
|
214
|
-
if (n > 60) return "\\"" out "…\\""
|
|
215
|
-
out = out c
|
|
216
|
-
}
|
|
217
|
-
return "\\"" t "\\""
|
|
218
|
-
}
|
|
219
|
-
BEGIN {
|
|
220
|
-
split("january jan february feb march mar april apr may june jun july jul august aug september sept sep october oct november nov december dec", nm, " ")
|
|
221
|
-
split("1 1 2 2 3 3 4 4 5 6 6 7 7 8 8 9 9 9 10 10 11 11 12 12", nv, " ")
|
|
222
|
-
for (i = 1; i <= 24; i++) MON[nm[i]] = nv[i] + 0
|
|
223
|
-
for (i = 1; i < 256; i++) ORD[sprintf("%c", i)] = i
|
|
224
|
-
}
|
|
225
|
-
{ line[NR] = $0; tl[NR] = trim($0) }
|
|
226
|
-
END {
|
|
227
|
-
L = total + 1
|
|
228
|
-
if (L <= limit) exit
|
|
229
|
-
n = 0; hdr = 0; s = 0
|
|
230
|
-
for (i = 1; i <= NR; i++) if (index(tl[i], "## Latest Entries") == 1) { s = i; break }
|
|
231
|
-
if (s) {
|
|
232
|
-
e = L + 1; for (i = s + 1; i <= NR; i++) if (tl[i] ~ /^## /) { e = i; break }
|
|
233
|
-
cur = 0
|
|
234
|
-
for (i = s + 1; i < e && i <= NR; i++) {
|
|
235
|
-
if (line[i] ~ /^[-*+] /) { n++; st[n] = i; en[n] = i; cur = 1 }
|
|
236
|
-
else if (cur && line[i] ~ /^[ \\t\\r]+[^ \\t\\r]/) en[n] = i
|
|
237
|
-
else cur = 0
|
|
238
|
-
}
|
|
239
|
-
for (k = 1; k <= n; k++) { txt = line[st[k]]; for (i = st[k] + 1; i <= en[k]; i++) txt = txt "\\n" line[i]; dt[k] = lastdate(txt) }
|
|
240
|
-
} else {
|
|
241
|
-
for (i = 1; i <= NR; i++) if (index(tl[i], "## Prompt History") == 1) { s = i; break }
|
|
242
|
-
if (!s) { print "REFUSE development/prompts.md has no \\"## Latest Entries\\" list or \\"## Prompt History\\" table, so there is nothing SpecPilot can archive safely."; exit }
|
|
243
|
-
e = L + 1; for (i = s + 1; i <= NR; i++) if (tl[i] ~ /^## /) { e = i; break }
|
|
244
|
-
for (i = s + 1; i < e - 1 && i < NR; i++) if (tl[i] ~ /^\\|/ && tl[i + 1] ~ /^\\|[ \\t:|-]+$/) { hdr = i; break }
|
|
245
|
-
if (hdr) {
|
|
246
|
-
col = 0; h = tl[hdr]; sub(/^\\|/, "", h); sub(/\\|$/, "", h); m = split(h, hc, "|")
|
|
247
|
-
for (j = 1; j <= m; j++) if (tolower(trim(hc[j])) == "date") { col = j; break }
|
|
248
|
-
for (i = hdr + 2; i < e && i <= NR && tl[i] ~ /^\\|/; i++) {
|
|
249
|
-
n++; st[n] = i; en[n] = i
|
|
250
|
-
if (col) { r = tl[i]; sub(/^\\|/, "", r); sub(/\\|$/, "", r); split(r, rc, "|"); dt[n] = lastdate(trim(rc[col])) }
|
|
251
|
-
else dt[n] = lastdate(line[i])
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
if (n < 2) exit
|
|
256
|
-
dir = 0; ps = 0; pd = 0
|
|
257
|
-
for (k = 1; k <= n; k++) {
|
|
258
|
-
if (!dt[k]) continue
|
|
259
|
-
if (ps && dt[k] != pd) {
|
|
260
|
-
step = dt[k] > pd ? 1 : -1
|
|
261
|
-
if (!dir) dir = step
|
|
262
|
-
else if (step != dir) {
|
|
263
|
-
print "REFUSE SpecPilot cannot tell which development/prompts.md entries are oldest, because their dates run both ways: " excerpt(line[ps]) " (" iso(pd) ") comes right before " excerpt(line[st[k]]) " (" iso(dt[k]) ") in a log that otherwise runs " (dir < 0 ? "newest first" : "oldest first") ". Put those entries in order and run it again."
|
|
264
|
-
exit
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
ps = st[k]; pd = dt[k]
|
|
268
|
-
}
|
|
269
|
-
if (!dir) { print "REFUSE SpecPilot cannot tell which development/prompts.md entries are oldest: fewer than two entries carry different dates."; exit }
|
|
270
|
-
for (k = 1; k < n; k++) {
|
|
271
|
-
if (dir < 0) { a = st[n - k + 1]; b = en[n] } else { a = st[1]; b = en[k] }
|
|
272
|
-
if (L - (b - a + 1) <= keep) break
|
|
273
|
-
}
|
|
274
|
-
print "MOVE", a, b, hdr
|
|
275
|
-
}' "$file")
|
|
276
|
-
[ -n "$plan" ] || return 0
|
|
277
|
-
case "$plan" in
|
|
278
|
-
REFUSE\\ *) echo "Not archived: \${plan#REFUSE }"; return 0 ;;
|
|
279
|
-
esac
|
|
280
|
-
local kind first last header
|
|
281
|
-
read -r kind first last header <<< "$plan"
|
|
282
|
-
|
|
283
|
-
# A file with no line break after its last line, whose moved block reaches that line: the
|
|
284
|
-
# CLI joins lines with "\\n", so the block still ends with a blank line in the archive and the
|
|
285
|
-
# kept file ends, still without a line break, at the line before the block.
|
|
286
|
-
local at_end=0
|
|
287
|
-
if [ -n "$(tail -c 1 "$file")" ] && [ "$last" -eq $(( $(wc -l < "$file") + 1 )) ]; then at_end=1; fi
|
|
288
|
-
{
|
|
289
|
-
echo "## Archived on $(timestamp)"; echo
|
|
290
|
-
if [ "$header" -gt 0 ]; then sed -n "\${header},$((header + 1))p" "$file"; fi
|
|
291
|
-
sed -n "\${first},\${last}p" "$file"
|
|
292
|
-
if [ "$at_end" = 1 ]; then echo; fi
|
|
293
|
-
echo; echo "---"; echo
|
|
294
|
-
} >> "$archive"
|
|
295
|
-
if [ "$at_end" = 1 ]; then
|
|
296
|
-
awk -v n=$((first - 1)) 'NR <= n { printf "%s%s", (NR > 1 ? "\\n" : ""), $0 }' "$file" > "$file.tmp"
|
|
297
|
-
else
|
|
298
|
-
{ sed -n "1,$((first - 1))p" "$file"; sed -n "$((last + 1)),\\$p" "$file"; } > "$file.tmp"
|
|
299
|
-
fi
|
|
300
|
-
mv "$file.tmp" "$file"
|
|
301
|
-
echo "Moved $((last - first + 1)) lines from $file -> $archive"
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
archive_tasks() {
|
|
305
|
-
local file=".specs/planning/tasks.md"
|
|
306
|
-
local archive=".specs/planning/tasks-archive.md"
|
|
307
|
-
[ -f "$file" ] || return 0
|
|
308
|
-
|
|
309
|
-
# Mirrors the CLI's planCompletedArchive() line for line. The section runs from
|
|
310
|
-
# "## Completed" to the next "## " heading, not EOF. Sizes use the CLI's arithmetic,
|
|
311
|
-
# which counts one more line than wc -l at EOF, so the EOF section end is total + 2.
|
|
312
|
-
# Entries are numbered-list lines, or else the body rows of a table (header and
|
|
313
|
-
# separator stay put); a table keeps only as many rows as fit the line limit.
|
|
314
|
-
# Prints "<shape> <first> <last> <header>" as 1-based lines to move, or nothing.
|
|
315
|
-
local plan
|
|
316
|
-
plan=$(awk -v total="$(wc -l < "$file")" -v limit="$COMPLETED_LINE_LIMIT" -v keep_max="$COMPLETED_KEEP_ENTRIES" '
|
|
317
|
-
{ line[NR] = $0; t = $0; gsub(/^[ \\t]+|[ \\t]+$/, "", t); trimmed[NR] = t }
|
|
318
|
-
END {
|
|
319
|
-
for (i = 1; i <= NR; i++) if (trimmed[i] == "## Completed") { start = i; break }
|
|
320
|
-
if (!start) exit
|
|
321
|
-
end_ = total + 2
|
|
322
|
-
for (i = start + 1; i <= NR; i++) if (trimmed[i] ~ /^## /) { end_ = i; break }
|
|
323
|
-
size = end_ - start
|
|
324
|
-
if (size <= limit) exit
|
|
325
|
-
for (i = start + 1; i < end_; i++) if (line[i] ~ /^[0-9]+\\./) {
|
|
326
|
-
if (end_ - i <= keep_max) exit
|
|
327
|
-
print "list", i, end_ - keep_max - 1, 0
|
|
328
|
-
exit
|
|
329
|
-
}
|
|
330
|
-
for (i = start + 1; i < end_ - 1; i++) if (trimmed[i] ~ /^\\|/ && trimmed[i + 1] ~ /^\\|[ \\t:|-]+$/) {
|
|
331
|
-
body = i + 2; stop = body
|
|
332
|
-
while (stop < end_ && trimmed[stop] ~ /^\\|/) stop++
|
|
333
|
-
rows = stop - body
|
|
334
|
-
keep = limit - (size - rows); if (keep < 0) keep = 0; if (keep > keep_max) keep = keep_max
|
|
335
|
-
if (rows <= keep) exit
|
|
336
|
-
print "table", body, stop - keep - 1, i
|
|
337
|
-
exit
|
|
338
|
-
}
|
|
339
|
-
}' "$file")
|
|
340
|
-
[ -n "$plan" ] || return 0
|
|
341
|
-
local shape first last header
|
|
342
|
-
read -r shape first last header <<< "$plan"
|
|
343
|
-
|
|
344
|
-
{
|
|
345
|
-
echo "## Archived on $(timestamp)"; echo
|
|
346
|
-
if [ "$shape" = "table" ]; then sed -n "\${header},$((header + 1))p" "$file"; fi
|
|
347
|
-
sed -n "\${first},\${last}p" "$file"
|
|
348
|
-
echo; echo "---"; echo
|
|
349
|
-
} >> "$archive"
|
|
350
|
-
{ sed -n "1,$((first - 1))p" "$file"; sed -n "$((last + 1)),\\$p" "$file"; } > "$file.tmp"
|
|
351
|
-
mv "$file.tmp" "$file"
|
|
352
|
-
echo "Moved $((last - first + 1)) entries from $file -> $archive"
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
archive_prompts
|
|
356
|
-
archive_tasks
|
|
357
|
-
\`\`\`
|
|
358
|
-
|
|
359
|
-
After running it:
|
|
360
|
-
1. Report what the script moved (file, line/entry count, archive destination) using its own output — do not recompute or second-guess the numbers.
|
|
361
|
-
2. If nothing exceeded the threshold, say so plainly: "Nothing to archive."
|
|
362
|
-
3. IDs are preserved automatically since content is moved verbatim into the archive file, never rewritten or renumbered.
|
|
363
|
-
|
|
364
|
-
This mirrors CLI \`specpilot archive --dry-run --force\` (REQ-002.A.8); the branch guard mirrors ARCH-004.19 (warns and requires \`y\` confirmation when not on \`main\`/\`master\`).`,
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
name: 'backfill',
|
|
368
|
-
description: 'Append missing mandate sections (Critical Mandates, Code Philosophy, Code Rules, Re-Anchor) to existing IDE files',
|
|
369
|
-
allowedTools: ['Bash', 'Read', 'Edit'],
|
|
370
|
-
body: `Backfill missing SpecPilot mandate sections into whichever IDE files already exist in this project. Run the script below — it checks four fingerprints per file and appends whichever are missing, append-only, never overwriting existing content.
|
|
371
|
-
|
|
372
|
-
\`\`\`bash
|
|
373
|
-
cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
|
|
374
|
-
|
|
375
|
-
CANDIDATE_FILES=(
|
|
376
|
-
".github/copilot-instructions.md"
|
|
377
|
-
"CLAUDE.md"
|
|
378
|
-
".cursor/rules/specpilot.mdc"
|
|
379
|
-
".windsurfrules"
|
|
380
|
-
".antigravity/rules.md"
|
|
381
|
-
)
|
|
382
|
-
|
|
383
|
-
has_critical() { grep -qF "Critical Mandates" "$1"; }
|
|
384
|
-
has_philosophy() { grep -qF "## Code Philosophy — Write Only What Needed" "$1"; }
|
|
385
|
-
has_rules() { grep -qF "## Code Rules" "$1"; }
|
|
386
|
-
has_reanchor() { grep -qF "## Re-Anchor" "$1"; }
|
|
387
|
-
|
|
388
|
-
append_critical() {
|
|
389
|
-
cat <<'BLOCK' >> "$1"
|
|
390
|
-
|
|
391
|
-
## 🔴 Critical Mandates — Never violate, no exceptions
|
|
392
|
-
|
|
393
|
-
1. No commit unless asked.
|
|
394
|
-
2. No push unless asked.
|
|
395
|
-
3. No deploy/publish/release unless asked.
|
|
396
|
-
4. No \`.specs/\` structure changes — content only.
|
|
397
|
-
5. Update specs after change:
|
|
398
|
-
- Trivial → \`planning/tasks.md\`
|
|
399
|
-
- Feature → \`project/requirements.md\` + \`planning/tasks.md\`
|
|
400
|
-
- Architectural → all affected files + \`CHANGELOG.md\`
|
|
401
|
-
6. Never reference file contents without reading first. If unread, say so.
|
|
402
|
-
7. Never write code or change files unless asked. Ask first.
|
|
403
|
-
8. Spec-first gate (scale to task size):
|
|
404
|
-
- Trivial → no gate
|
|
405
|
-
- Feature → read 1–2 relevant \`.specs/\` files before coding
|
|
406
|
-
- Architectural → update all affected specs, present Spec Report, wait for \`yes, proceed\`
|
|
407
|
-
BLOCK
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
append_philosophy() {
|
|
411
|
-
cat <<'BLOCK' >> "$1"
|
|
412
|
-
|
|
413
|
-
## Code Philosophy — Write Only What Needed
|
|
414
|
-
|
|
415
|
-
1. Need exist? No → skip. Say why.
|
|
416
|
-
2. Already in codebase? → reuse. Not rewrite.
|
|
417
|
-
3. Stdlib do it? → use it.
|
|
418
|
-
4. Native or installed dep cover it? → use. No new deps.
|
|
419
|
-
5. One line do it? → write that.
|
|
420
|
-
6. Only then: minimum code that work.
|
|
421
|
-
7. Never cut: validation, error handling, security, explicit requirement.
|
|
422
|
-
BLOCK
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
append_rules() {
|
|
426
|
-
cat <<'BLOCK' >> "$1"
|
|
427
|
-
|
|
428
|
-
## Code Rules
|
|
429
|
-
|
|
430
|
-
1. No abstraction, interface, factory, or pattern unless asked.
|
|
431
|
-
2. No scaffold "for later". Later scaffold itself.
|
|
432
|
-
3. Delete before add.
|
|
433
|
-
4. Shortest correct diff win.
|
|
434
|
-
5. Fix cause, not symptom. One guard in shared function beat guard in every caller.
|
|
435
|
-
6. Boring over clever. Clever = 3am bug.
|
|
436
|
-
7. Read before write. Never reference code you haven't read.
|
|
437
|
-
BLOCK
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
append_reanchor() {
|
|
441
|
-
cat <<'BLOCK' >> "$1"
|
|
442
|
-
|
|
443
|
-
## Re-Anchor
|
|
444
|
-
|
|
445
|
-
If you lose context mid-session, read \`.specs/project/project.yaml\` to restore full project context.
|
|
446
|
-
For a ready-made re-anchor prompt, see \`.specs/development/prompts.md → ## Re-Anchor Prompt\`.
|
|
447
|
-
BLOCK
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
for f in "\${CANDIDATE_FILES[@]}"; do
|
|
451
|
-
if [ ! -f "$f" ]; then
|
|
452
|
-
echo "SKIPPED (not found): $f"
|
|
453
|
-
continue
|
|
454
|
-
fi
|
|
455
|
-
|
|
456
|
-
added=()
|
|
457
|
-
has_critical "$f" || { append_critical "$f"; added+=("Critical Mandates"); }
|
|
458
|
-
has_philosophy "$f" || { append_philosophy "$f"; added+=("Code Philosophy"); }
|
|
459
|
-
has_rules "$f" || { append_rules "$f"; added+=("Code Rules"); }
|
|
460
|
-
has_reanchor "$f" || { append_reanchor "$f"; added+=("Re-Anchor"); }
|
|
461
|
-
|
|
462
|
-
if [ \${#added[@]} -eq 0 ]; then
|
|
463
|
-
echo "ALREADY CURRENT: $f"
|
|
464
|
-
else
|
|
465
|
-
echo "UPDATED: $f (added: \${added[*]})"
|
|
466
|
-
fi
|
|
467
|
-
done
|
|
468
|
-
|
|
469
|
-
echo
|
|
470
|
-
echo "== team.devPrefix check =="
|
|
471
|
-
YAML=".specs/project/project.yaml"
|
|
472
|
-
if [ -f "$YAML" ] && ! grep -q "devPrefix:" "$YAML"; then
|
|
473
|
-
echo "MISSING: team.devPrefix in $YAML — ask the user for a short handle (e.g. GitHub username) and add it under a team: section."
|
|
474
|
-
fi
|
|
475
|
-
\`\`\`
|
|
476
|
-
|
|
477
|
-
After running it:
|
|
478
|
-
1. Report per file: updated (with which sections were added), already-current, or skipped (file not found).
|
|
479
|
-
2. If the devPrefix check printed a missing-handle line, ask the user for a short handle (their GitHub/GitLab/Bitbucket username or any short tag) and add it under a \`team:\` section in \`project.yaml\` yourself — the script only detects the gap, it does not prompt interactively.
|
|
480
|
-
3. Never overwrite existing content in any file; every append goes to the end of the file.
|
|
481
|
-
|
|
482
|
-
**Maintenance cost**: unlike the CLI's \`specBackfiller.ts\`, this command has no shared source-of-truth constant to import — its four fingerprint blocks above are a literal copy and must be manually kept in sync whenever \`CLAUDE.md\`/\`copilot-instructions.md\` generation changes (\`buildCriticalMandatesMarkdown()\`, \`buildCodePhilosophyMarkdown()\` in \`ideConfigGenerator.ts\`). If this command's output ever looks stale, check those functions first.`,
|
|
483
|
-
},
|
|
484
|
-
];
|
|
8
|
+
const slashCommands_1 = require("../core/slashCommands");
|
|
9
|
+
Object.defineProperty(exports, "SLASH_COMMANDS", { enumerable: true, get: function () { return slashCommands_1.SLASH_COMMANDS; } });
|
|
485
10
|
/**
|
|
486
11
|
* SHA-256 of every command file a released SpecPilot generated, per target path, oldest first.
|
|
487
12
|
* v2.2.0 was the first release to write command files. `refreshCommands()` replaces a file only when
|
|
@@ -672,21 +197,21 @@ exports.CODEX_PROMPTS_NOTICE = '⚠️ SpecPilot slash commands were written to
|
|
|
672
197
|
*/
|
|
673
198
|
class SlashCommandGenerator {
|
|
674
199
|
/** Creates the missing command files; an existing one is kept (BL-073) and returned, project-relative. */
|
|
675
|
-
generate(projectDir, ide, commands =
|
|
200
|
+
generate(projectDir, ide, commands = slashCommands_1.SLASH_COMMANDS) {
|
|
676
201
|
const key = ide.toLowerCase();
|
|
677
202
|
const kept = [];
|
|
678
203
|
for (const command of commands) {
|
|
679
|
-
const target =
|
|
204
|
+
const target = (0, slashCommands_1.resolveTarget)(key, command);
|
|
680
205
|
if (!this.write(projectDir, target.dir, target.fileName, target.content))
|
|
681
206
|
kept.push(`${target.dir}/${target.fileName}`);
|
|
682
207
|
}
|
|
683
208
|
return kept;
|
|
684
209
|
}
|
|
685
210
|
/** The files `generate()` writes for this IDE, project-relative, in order (BL-055). */
|
|
686
|
-
targets(ide, commands =
|
|
211
|
+
targets(ide, commands = slashCommands_1.SLASH_COMMANDS) {
|
|
687
212
|
const key = ide.toLowerCase();
|
|
688
213
|
return commands.map(command => {
|
|
689
|
-
const target =
|
|
214
|
+
const target = (0, slashCommands_1.resolveTarget)(key, command);
|
|
690
215
|
return `${target.dir}/${target.fileName}`;
|
|
691
216
|
});
|
|
692
217
|
}
|
|
@@ -695,11 +220,11 @@ class SlashCommandGenerator {
|
|
|
695
220
|
* files, replaces files whose bytes match a known SpecPilot version, and keeps everything else
|
|
696
221
|
* untouched. In dry-run, reports the same outcomes and writes nothing.
|
|
697
222
|
*/
|
|
698
|
-
refreshCommands(projectDir, ide, dryRun, commands =
|
|
223
|
+
refreshCommands(projectDir, ide, dryRun, commands = slashCommands_1.SLASH_COMMANDS, known = exports.KNOWN_COMMAND_HASHES) {
|
|
699
224
|
const key = ide.toLowerCase();
|
|
700
225
|
const result = { added: [], updated: [], kept: [] };
|
|
701
226
|
for (const command of commands) {
|
|
702
|
-
const target =
|
|
227
|
+
const target = (0, slashCommands_1.resolveTarget)(key, command);
|
|
703
228
|
const path = `${target.dir}/${target.fileName}`;
|
|
704
229
|
const filePath = (0, path_1.join)(projectDir, ...target.dir.split('/'), target.fileName);
|
|
705
230
|
let st;
|
|
@@ -771,42 +296,11 @@ class SlashCommandGenerator {
|
|
|
771
296
|
throw err;
|
|
772
297
|
}
|
|
773
298
|
}
|
|
774
|
-
resolveTarget(ide, command) {
|
|
775
|
-
switch (ide) {
|
|
776
|
-
case 'claude-code':
|
|
777
|
-
return { dir: '.claude/commands', fileName: `specpilot-${command.name}.md`, content: this.claudeFrontmatter(command) + command.body };
|
|
778
|
-
case 'cursor':
|
|
779
|
-
return { dir: '.cursor/commands', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
|
|
780
|
-
case 'windsurf':
|
|
781
|
-
return { dir: '.windsurf/workflows', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
|
|
782
|
-
case 'antigravity':
|
|
783
|
-
return { dir: '.agent/workflows', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
|
|
784
|
-
case 'codex':
|
|
785
|
-
return { dir: '.codex/prompts', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
|
|
786
|
-
default:
|
|
787
|
-
// vscode and unknown IDEs → GitHub Copilot prompt files
|
|
788
|
-
return { dir: '.github/prompts', fileName: `specpilot-${command.name}.prompt.md`, content: this.copilotFrontmatter(command) + command.body };
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
299
|
write(projectDir, dir, fileName, content) {
|
|
792
300
|
const fullDir = (0, path_1.join)(projectDir, ...dir.split('/'));
|
|
793
301
|
(0, fs_1.mkdirSync)(fullDir, { recursive: true });
|
|
794
302
|
return (0, ideConfigGenerator_1.writeNew)((0, path_1.join)(fullDir, fileName), content);
|
|
795
303
|
}
|
|
796
|
-
claudeFrontmatter(command) {
|
|
797
|
-
const lines = [`description: ${command.description}`];
|
|
798
|
-
if (command.argumentHint)
|
|
799
|
-
lines.push(`argument-hint: ${command.argumentHint}`);
|
|
800
|
-
if (command.allowedTools)
|
|
801
|
-
lines.push(`allowed-tools: ${command.allowedTools.join(', ')}`);
|
|
802
|
-
return `---\n${lines.join('\n')}\n---\n\n`;
|
|
803
|
-
}
|
|
804
|
-
simpleFrontmatter(command) {
|
|
805
|
-
return `---\ndescription: ${command.description}\n---\n\n`;
|
|
806
|
-
}
|
|
807
|
-
copilotFrontmatter(command) {
|
|
808
|
-
return `---\nmode: agent\ndescription: ${command.description}\n---\n\n`;
|
|
809
|
-
}
|
|
810
304
|
}
|
|
811
305
|
exports.SlashCommandGenerator = SlashCommandGenerator;
|
|
812
306
|
function sha256(bytes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slashCommandGenerator.js","sourceRoot":"","sources":["../../src/utils/slashCommandGenerator.ts"],"names":[],"mappings":";;;AAAA,mCAAiD;AACjD,+BAA+C;AAC/C,2BAAqJ;AACrJ,6DAAgD;
|
|
1
|
+
{"version":3,"file":"slashCommandGenerator.js","sourceRoot":"","sources":["../../src/utils/slashCommandGenerator.ts"],"names":[],"mappings":";;;AAAA,mCAAiD;AACjD,+BAA+C;AAC/C,2BAAqJ;AACrJ,6DAAgD;AAChD,yDAAoF;AAE3E,+FAFc,8BAAc,OAEd;AAmBvB;;;;;GAKG;AACU,QAAA,oBAAoB,GAA6B;IAC5D,uCAAuC,EAAE;QACvC,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;QAClE,kEAAkE;KACnE;IACD,wCAAwC,EAAE;QACx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