specpilot 2.1.0 → 2.2.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../../src/commands/backfill.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E"}
1
+ {"version":3,"file":"backfill.d.ts","sourceRoot":"","sources":["../../src/commands/backfill.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsB7E"}
@@ -74,6 +74,18 @@ function ideFileResultLines(r, dryRun) {
74
74
  }
75
75
  return lines;
76
76
  }
77
+ function slashCommandResultLines(r, dryRun) {
78
+ const lines = [chalk_1.default.cyan(`📄 ${r.ide} slash commands`)];
79
+ if (r.added.length === 0) {
80
+ lines.push(chalk_1.default.green(' ✅ All commands already present — nothing to backfill'));
81
+ }
82
+ else {
83
+ const verb = dryRun ? 'Would add' : 'Added';
84
+ lines.push(chalk_1.default.white(` ➕ ${verb} ${r.added.length} missing command(s):`));
85
+ r.added.forEach((name) => lines.push(chalk_1.default.white(` • specpilot-${name}`)));
86
+ }
87
+ return lines;
88
+ }
77
89
  function displayResult(result, dryRun, logger) {
78
90
  const allResults = [result.projectYaml, result.copilotInstructions, result.tasksMd, ...result.ideFiles];
79
91
  const ideLines = result.ideFiles.length > 0
@@ -83,6 +95,13 @@ function displayResult(result, dryRun, logger) {
83
95
  ...result.ideFiles.flatMap((r) => [...ideFileResultLines(r, dryRun), '']),
84
96
  ]
85
97
  : [];
98
+ const slashLines = result.slashCommands.length > 0
99
+ ? [
100
+ chalk_1.default.blue.bold('Slash commands'),
101
+ '',
102
+ ...result.slashCommands.flatMap((r) => [...slashCommandResultLines(r, dryRun), '']),
103
+ ]
104
+ : [];
86
105
  const content = [
87
106
  chalk_1.default.blue.bold(`Backfill Results${dryRun ? ' (dry-run — no changes written)' : ''}`),
88
107
  '',
@@ -93,9 +112,12 @@ function displayResult(result, dryRun, logger) {
93
112
  ...fileResultLines('.specs/planning/tasks.md', result.tasksMd, dryRun),
94
113
  '',
95
114
  ...ideLines,
115
+ ...slashLines,
96
116
  ];
97
- const updatedCount = allResults.filter((r) => r.action === 'updated' || r.action === 'created').length;
98
- const skippedCount = allResults.filter((r) => r.action === 'skipped').length;
117
+ const updatedCount = allResults.filter((r) => r.action === 'updated' || r.action === 'created').length +
118
+ result.slashCommands.filter((r) => r.added.length > 0).length;
119
+ const skippedCount = allResults.filter((r) => r.action === 'skipped').length +
120
+ result.slashCommands.filter((r) => r.added.length === 0).length;
99
121
  const staleCount = allResults.filter((r) => r.action === 'stale').length;
100
122
  if (updatedCount === 0 && staleCount === 0) {
101
123
  content.push(chalk_1.default.green('✅ Everything is up to date — nothing to backfill.'));
@@ -1 +1 @@
1
- {"version":3,"file":"backfill.js","sourceRoot":"","sources":["../../src/commands/backfill.ts"],"names":[],"mappings":";;;;;AAiBA,0CAsBC;AAvCD,kDAA0B;AAC1B,+BAA+B;AAC/B,4DAKiC;AACjC,4CAAyC;AASlC,KAAK,UAAU,eAAe,CAAC,OAAwB;IAC5D,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAC5B,MAAM,UAAU,GAAG,IAAA,cAAO,EAAC,OAAO,CAAC,GAAG,CAAC,CA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,CAAC,MAAM,CACV,OAAO,YAAY,8BAA8B,YAAY,wBAAwB,UAAU,yCAAyC,CACzI,CACF,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CACV,eAAK,CAAC,KAAK,CACT,KAAK,YAAY,qBAAqB,YAAY,wBAAwB,UAAU,SAAS,CAC9F,CACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,IAAI,CAAC,eAAK,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAcD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,iBAwG7D"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;CAClB;AAcD,wBAAsB,eAAe,CAAC,OAAO,EAAE,eAAe,iBAsG7D"}
@@ -56,9 +56,7 @@ async function validateCommand(options) {
56
56
  for (const fix of fixed) {
57
57
  const label = fix.startsWith('create-')
58
58
  ? `Created missing file: ${fix.replace('create-', '')}`
59
- : fix === 'create-prompts-entry'
60
- ? 'Created initial prompts entry in prompts.md'
61
- : fix;
59
+ : fix;
62
60
  console.log(chalk_1.default.green(` • ${label}`));
63
61
  }
64
62
  // Re-validate after fixing
@@ -1 +1 @@
1
- {"version":3,"file":"validate.js","sourceRoot":"","sources":["../../src/commands/validate.ts"],"names":[],"mappings":";;;;;AAsBA,0CAwGC;AA9HD,kDAA0B;AAC1B,0DAAyE;AACzE,4CAAyC;AAQzC,SAAS,iBAAiB,CAAC,OAAyB;IAClD,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAC5C,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC,CAAC;IAClF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,KAAK,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;QACnD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC;AAEM,KAAK,UAAU,eAAe,CAAC,OAAwB;IAC5D,MAAM,MAAM,GAAG,IAAI,eAAM,EAAE,CAAC;IAE5B,IAAI,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;QAEvD,MAAM,SAAS,GAAG,IAAI,6BAAa,EAAE,CAAC;QACtC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AC,CAAC;YAClB,CAAC;QACH,CAAC;IAEH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,YAAY,CAAC,mBAAmB,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACnG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ /** A single slash/workflow command, defined once and rendered per IDE. */
2
+ export interface SlashCommand {
3
+ name: string;
4
+ description: string;
5
+ body: string;
6
+ argumentHint?: string;
7
+ allowedTools?: string[];
8
+ }
9
+ /**
10
+ * Commands to generate. Populated one command at a time by CS-080 through
11
+ * CS-087.
12
+ */
13
+ export declare const SLASH_COMMANDS: SlashCommand[];
14
+ /**
15
+ * Generates per-IDE slash/workflow command files from SLASH_COMMANDS.
16
+ * Parallel to IdeConfigGenerator — each IDE gets its own directory, file
17
+ * naming, and frontmatter format for the same shared command definitions.
18
+ */
19
+ export declare class SlashCommandGenerator {
20
+ generate(projectDir: string, ide: string, commands?: SlashCommand[]): void;
21
+ /**
22
+ * Writes only the command files missing on disk for the given IDE —
23
+ * used by `specpilot backfill` for existing projects. Never overwrites.
24
+ * Returns the names of the commands that were (or, in dry-run, would be) added.
25
+ */
26
+ backfillMissing(projectDir: string, ide: string, dryRun: boolean, commands?: SlashCommand[]): string[];
27
+ private resolveTarget;
28
+ private write;
29
+ private claudeFrontmatter;
30
+ private simpleFrontmatter;
31
+ private copilotFrontmatter;
32
+ }
33
+ //# sourceMappingURL=slashCommandGenerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slashCommandGenerator.d.ts","sourceRoot":"","sources":["../../src/utils/slashCommandGenerator.ts"],"names":[],"mappings":"AAGA,0EAA0E;AAC1E,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,EAyWxC,CAAC;AAEF;;;;GAIG;AACH,qBAAa,qBAAqB;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,YAAY,EAAmB,GAAG,IAAI;IAkB1F;;;;OAIG;IACH,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,OAAO,EACf,QAAQ,GAAE,YAAY,EAAmB,GACxC,MAAM,EAAE;IAeX,OAAO,CAAC,aAAa;IAkBrB,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,kBAAkB;CAG3B"}
@@ -0,0 +1,450 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SlashCommandGenerator = exports.SLASH_COMMANDS = void 0;
4
+ const path_1 = require("path");
5
+ const fs_1 = require("fs");
6
+ /**
7
+ * Commands to generate. Populated one command at a time by CS-080 through
8
+ * CS-087.
9
+ */
10
+ exports.SLASH_COMMANDS = [
11
+ {
12
+ name: 'status',
13
+ description: 'Show current sprint status and next milestone at a glance',
14
+ body: `Give a one-screen status summary of the current sprint.
15
+
16
+ 1. Read \`.specs/planning/tasks.md\` and extract the \`## Current Sprint\` section — list each item's ID and a short (<15 word) restatement.
17
+ 2. Read \`.specs/planning/roadmap.md\` and find the \`## Milestones\` section — identify the next incomplete milestone.
18
+ 3. Present a compact summary with two headings:
19
+ - **Current Sprint**: bullet list of \`[CS-###] [BL-###]\` items with their short restatement.
20
+ - **Next Milestone**: the next unchecked milestone from roadmap.md.
21
+
22
+ Keep it to one screen — do not re-print full task descriptions, just IDs and short summaries.`,
23
+ },
24
+ {
25
+ name: 'reanchor',
26
+ description: 'Restore full project context after losing it mid-session',
27
+ body: `Restore operating context for this project.
28
+
29
+ 1. Read \`.specs/project/project.yaml\` in full.
30
+ 2. Read the \`## Re-Anchor Prompt\` section of \`.specs/development/prompts.md\` verbatim.
31
+ 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.
32
+
33
+ Do not summarize or paraphrase away detail; this command exists specifically to recover full context, not an abbreviated version of it.`,
34
+ },
35
+ {
36
+ name: 'report',
37
+ description: 'Run the Spec-First review gate: classify the change, update specs, then wait for confirmation before coding',
38
+ body: `Formalize the Spec-First review gate (mandate 8) for the pending change.
39
+
40
+ 1. Classify the pending change as trivial, feature, or architectural:
41
+ - Trivial: no spec update required.
42
+ - Feature: touches \`project/requirements.md\` and \`planning/tasks.md\`.
43
+ - Architectural: touches all affected spec files plus \`CHANGELOG.md\`.
44
+ 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\`).
45
+ 3. Update the affected spec files first — before writing any code.
46
+ 4. Present a Spec Report: classification, files touched, what changed in each, and what the specs now say.
47
+ 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.`,
48
+ },
49
+ {
50
+ name: 'sync',
51
+ description: 'Compare .specs/ against actual project state and propose fixes for drift',
52
+ body: `Find and fix drift between \`.specs/\` and the real project.
53
+
54
+ 1. Read \`.specs/architecture/architecture.md\`, \`.specs/project/requirements.md\`, and \`.specs/quality/tests.md\`.
55
+ 2. Compare their claims against the actual \`src/\` structure and \`package.json\` (versions, dependencies, scripts).
56
+ 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.
57
+ 4. Propose specific per-file edits to close each discrepancy — do not just describe the problem, show the fix.
58
+ 5. Wait for the user's confirmation before writing any of the proposed edits.
59
+
60
+ This is a judgment/comparison task, not a mechanical one — do not attempt to script the diff; read and reason about each file.`,
61
+ },
62
+ {
63
+ name: 'refine',
64
+ description: 'Refine .specs/ requirements from a new requirement description, with a diff preview before writing',
65
+ argumentHint: '<description>',
66
+ body: `Refine the project's spec files with a new requirement.
67
+
68
+ Requirement description: $ARGUMENTS
69
+
70
+ 1. Read the current \`.specs/project/requirements.md\`, \`.specs/development/context.md\`, and \`.specs/development/prompts.md\`.
71
+ 2. Propose specific additions or edits to those files that incorporate the requirement description above, following the existing stable-ID conventions (e.g. \`REQ-###.#\`).
72
+ 3. Show a line-level diff preview of every proposed change — do not just describe it.
73
+ 4. Wait for the user's confirmation before writing anything.
74
+ 5. Once confirmed, write the changes.
75
+
76
+ 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.`,
77
+ },
78
+ {
79
+ name: 'validate',
80
+ description: 'Validate .specs/ structure, front-matter, and cross-references; suggest fixes without auto-applying',
81
+ allowedTools: ['Bash', 'Read'],
82
+ body: `Validate the project's \`.specs/\` files. Run the script below, then summarize the results in plain language.
83
+
84
+ \`\`\`bash
85
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
86
+
87
+ REQUIRED_FILES=(
88
+ ".specs/project/project.yaml"
89
+ ".specs/architecture/architecture.md"
90
+ ".specs/project/requirements.md"
91
+ ".specs/architecture/api.yaml"
92
+ ".specs/quality/tests.md"
93
+ ".specs/planning/tasks.md"
94
+ ".specs/development/context.md"
95
+ ".specs/development/prompts.md"
96
+ ".specs/security/threat-model.md"
97
+ ".specs/security/security-decisions.md"
98
+ )
99
+
100
+ echo "== Missing required files =="
101
+ missing=0
102
+ for f in "\${REQUIRED_FILES[@]}"; do
103
+ if [ ! -f "$f" ]; then echo "MISSING: $f"; missing=1; fi
104
+ done
105
+ [ "$missing" -eq 0 ] && echo "none"
106
+
107
+ echo
108
+ echo "== Front-matter field checks (fileID, lastUpdated, version, contributors, relatedFiles) =="
109
+ clean=1
110
+ for f in "\${REQUIRED_FILES[@]}"; do
111
+ [[ "$f" == *.md ]] || continue
112
+ [ -f "$f" ] || continue
113
+ fm=$(sed -n '2,/^---$/p' "$f")
114
+ for field in fileID lastUpdated version contributors relatedFiles; do
115
+ if ! echo "$fm" | grep -q "^\${field}:"; then
116
+ echo "MISSING $field in $f"
117
+ clean=0
118
+ fi
119
+ done
120
+ done
121
+ [ "$clean" -eq 1 ] && echo "all fields present"
122
+
123
+ echo
124
+ echo "== relatedFiles cross-reference check =="
125
+ clean=1
126
+ for f in "\${REQUIRED_FILES[@]}"; do
127
+ [[ "$f" == *.md ]] || continue
128
+ [ -f "$f" ] || continue
129
+ refs=$(sed -n '2,/^---$/p' "$f" | sed -n '/^relatedFiles:/,/^[a-zA-Z]/p' | grep -oE '[A-Za-z0-9_.-]+\\.(md|yaml)')
130
+ for ref in $refs; do
131
+ if ! find .specs -name "$ref" | grep -q .; then
132
+ echo "BROKEN REF in $f -> $ref (not found anywhere under .specs/)"
133
+ clean=0
134
+ fi
135
+ done
136
+ done
137
+ [ "$clean" -eq 1 ] && echo "all cross-references resolve"
138
+ \`\`\`
139
+
140
+ Never eyeball line counts or fingerprints by hand where this script already computes them exactly.
141
+
142
+ After running it:
143
+ 1. Summarize each of the three sections in plain language (what's missing, what's wrong, what's broken).
144
+ 2. For every issue found, suggest a specific fix — but never apply it automatically. Wait for the user to ask before editing any file.
145
+ 3. If everything passes, say so plainly; do not manufacture issues.
146
+
147
+ **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.`,
148
+ },
149
+ {
150
+ name: 'archive',
151
+ description: 'Archive oversized .specs/ files (tasks.md Completed section, prompts.md) with a branch safety guard',
152
+ allowedTools: ['Bash', 'Read', 'Edit'],
153
+ body: `Archive oversized \`.specs/\` files: \`.specs/planning/tasks.md\`'s \`## Completed\` section beyond 25 lines, and \`.specs/development/prompts.md\` beyond 100 total lines.
154
+
155
+ 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.
156
+
157
+ \`\`\`bash
158
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
159
+
160
+ PROMPTS_LINE_LIMIT=100
161
+ PROMPTS_KEEP_LINES=80
162
+ COMPLETED_LINE_LIMIT=25
163
+ COMPLETED_KEEP_ENTRIES=20
164
+
165
+ branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "")
166
+ if [ -n "$branch" ] && [ "$branch" != "main" ] && [ "$branch" != "master" ]; then
167
+ echo "WARNING: on branch '$branch'. Archive is recommended only on the default branch after merging."
168
+ read -p "Continue? [y/N] " confirm
169
+ if [ "$confirm" != "y" ] && [ "$confirm" != "Y" ]; then
170
+ echo "Archive cancelled."
171
+ exit 0
172
+ fi
173
+ fi
174
+
175
+ timestamp() { date -u +"%Y-%m-%d %H:%M:%S"; }
176
+
177
+ archive_prompts() {
178
+ local file=".specs/development/prompts.md"
179
+ local archive=".specs/development/prompts-archive.md"
180
+ [ -f "$file" ] || return 0
181
+ local total
182
+ total=$(wc -l < "$file")
183
+ if [ "$total" -le "$PROMPTS_LINE_LIMIT" ]; then return 0; fi
184
+
185
+ # Anchor on "## Latest Entries" so boilerplate (Re-Anchor Prompt, etc.) is never
186
+ # mistaken for archivable log content; fall back to front-matter close, then line 0.
187
+ local anchor_line
188
+ anchor_line=$(grep -n '^## Latest Entries' "$file" | head -1 | cut -d: -f1)
189
+ if [ -z "$anchor_line" ]; then
190
+ if [ "$(sed -n '1p' "$file")" = "---" ]; then
191
+ anchor_line=$(awk 'NR>1 && $0=="---" {print NR; exit}' "$file")
192
+ else
193
+ anchor_line=0
194
+ fi
195
+ fi
196
+ local body_start=$((anchor_line + 1))
197
+ local body_lines=$((total - anchor_line))
198
+ local keep=$((PROMPTS_KEEP_LINES - anchor_line))
199
+ if [ "$keep" -lt 50 ]; then keep=50; fi
200
+ if [ "$body_lines" -le "$keep" ]; then return 0; fi
201
+
202
+ local archive_count=$((body_lines - keep))
203
+ local archive_end=$((body_start + archive_count - 1))
204
+
205
+ { echo "## Archived on $(timestamp)"; echo; sed -n "\${body_start},\${archive_end}p" "$file"; echo; echo "---"; echo; } >> "$archive"
206
+ { sed -n "1,\${anchor_line}p" "$file"; sed -n "$((archive_end + 1)),\\$p" "$file"; } > "$file.tmp"
207
+ mv "$file.tmp" "$file"
208
+ echo "Moved $archive_count lines from $file -> $archive"
209
+ }
210
+
211
+ archive_tasks() {
212
+ local file=".specs/planning/tasks.md"
213
+ local archive=".specs/planning/tasks-archive.md"
214
+ [ -f "$file" ] || return 0
215
+ local total
216
+ total=$(wc -l < "$file")
217
+ local completed_line
218
+ completed_line=$(grep -n '^## Completed$' "$file" | head -1 | cut -d: -f1)
219
+ [ -n "$completed_line" ] || return 0
220
+
221
+ local section_size=$((total - completed_line + 1))
222
+ if [ "$section_size" -le "$COMPLETED_LINE_LIMIT" ]; then return 0; fi
223
+
224
+ local entry_start=$((completed_line + 1))
225
+ while [ "$entry_start" -le "$total" ] && ! sed -n "\${entry_start}p" "$file" | grep -qE '^[0-9]+\\.'; do
226
+ entry_start=$((entry_start + 1))
227
+ done
228
+ if [ "$entry_start" -gt "$total" ]; then return 0; fi
229
+
230
+ local entry_count=$((total - entry_start + 1))
231
+ if [ "$entry_count" -le "$COMPLETED_KEEP_ENTRIES" ]; then return 0; fi
232
+
233
+ local archive_count=$((entry_count - COMPLETED_KEEP_ENTRIES))
234
+ local archive_end=$((entry_start + archive_count - 1))
235
+
236
+ { echo "## Archived on $(timestamp)"; echo; sed -n "\${entry_start},\${archive_end}p" "$file"; echo; echo "---"; echo; } >> "$archive"
237
+ { sed -n "1,$((entry_start - 1))p" "$file"; sed -n "$((archive_end + 1)),\\$p" "$file"; } > "$file.tmp"
238
+ mv "$file.tmp" "$file"
239
+ echo "Moved $archive_count entries from $file -> $archive"
240
+ }
241
+
242
+ archive_prompts
243
+ archive_tasks
244
+ \`\`\`
245
+
246
+ After running it:
247
+ 1. Report what the script moved (file, line/entry count, archive destination) using its own output — do not recompute or second-guess the numbers.
248
+ 2. If nothing exceeded the threshold, say so plainly: "Nothing to archive."
249
+ 3. IDs are preserved automatically since content is moved verbatim into the archive file, never rewritten or renumbered.
250
+
251
+ 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\`).`,
252
+ },
253
+ {
254
+ name: 'backfill',
255
+ description: 'Append missing mandate sections (Critical Mandates, Code Philosophy, Code Rules, Re-Anchor) to existing IDE files',
256
+ allowedTools: ['Bash', 'Read', 'Edit'],
257
+ 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.
258
+
259
+ \`\`\`bash
260
+ cd "$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
261
+
262
+ CANDIDATE_FILES=(
263
+ ".github/copilot-instructions.md"
264
+ "CLAUDE.md"
265
+ ".cursor/rules/specpilot.mdc"
266
+ ".windsurfrules"
267
+ ".antigravity/rules.md"
268
+ )
269
+
270
+ has_critical() { grep -qF "Critical Mandates" "$1"; }
271
+ has_philosophy() { grep -qF "## Code Philosophy — Write Only What Needed" "$1"; }
272
+ has_rules() { grep -qF "## Code Rules" "$1"; }
273
+ has_reanchor() { grep -qF "## Re-Anchor" "$1"; }
274
+
275
+ append_critical() {
276
+ cat <<'BLOCK' >> "$1"
277
+
278
+ ## 🔴 Critical Mandates — Never violate, no exceptions
279
+
280
+ 1. No commit unless asked.
281
+ 2. No push unless asked.
282
+ 3. No deploy/publish/release unless asked.
283
+ 4. No \`.specs/\` structure changes — content only.
284
+ 5. Update specs after change:
285
+ - Trivial → \`planning/tasks.md\`
286
+ - Feature → \`project/requirements.md\` + \`planning/tasks.md\`
287
+ - Architectural → all affected files + \`CHANGELOG.md\`
288
+ 6. Never reference file contents without reading first. If unread, say so.
289
+ 7. Never write code or change files unless asked. Ask first.
290
+ 8. Spec-first gate (scale to task size):
291
+ - Trivial → no gate
292
+ - Feature → read 1–2 relevant \`.specs/\` files before coding
293
+ - Architectural → update all affected specs, present Spec Report, wait for \`yes, proceed\`
294
+ BLOCK
295
+ }
296
+
297
+ append_philosophy() {
298
+ cat <<'BLOCK' >> "$1"
299
+
300
+ ## Code Philosophy — Write Only What Needed
301
+
302
+ 1. Need exist? No → skip. Say why.
303
+ 2. Already in codebase? → reuse. Not rewrite.
304
+ 3. Stdlib do it? → use it.
305
+ 4. Native or installed dep cover it? → use. No new deps.
306
+ 5. One line do it? → write that.
307
+ 6. Only then: minimum code that work.
308
+ 7. Never cut: validation, error handling, security, explicit requirement.
309
+ BLOCK
310
+ }
311
+
312
+ append_rules() {
313
+ cat <<'BLOCK' >> "$1"
314
+
315
+ ## Code Rules
316
+
317
+ 1. No abstraction, interface, factory, or pattern unless asked.
318
+ 2. No scaffold "for later". Later scaffold itself.
319
+ 3. Delete before add.
320
+ 4. Shortest correct diff win.
321
+ 5. Fix cause, not symptom. One guard in shared function beat guard in every caller.
322
+ 6. Boring over clever. Clever = 3am bug.
323
+ 7. Read before write. Never reference code you haven't read.
324
+ BLOCK
325
+ }
326
+
327
+ append_reanchor() {
328
+ cat <<'BLOCK' >> "$1"
329
+
330
+ ## Re-Anchor
331
+
332
+ If you lose context mid-session, read \`.specs/project/project.yaml\` to restore full project context.
333
+ For a ready-made re-anchor prompt, see \`.specs/development/prompts.md → ## Re-Anchor Prompt\`.
334
+ BLOCK
335
+ }
336
+
337
+ for f in "\${CANDIDATE_FILES[@]}"; do
338
+ if [ ! -f "$f" ]; then
339
+ echo "SKIPPED (not found): $f"
340
+ continue
341
+ fi
342
+
343
+ added=()
344
+ has_critical "$f" || { append_critical "$f"; added+=("Critical Mandates"); }
345
+ has_philosophy "$f" || { append_philosophy "$f"; added+=("Code Philosophy"); }
346
+ has_rules "$f" || { append_rules "$f"; added+=("Code Rules"); }
347
+ has_reanchor "$f" || { append_reanchor "$f"; added+=("Re-Anchor"); }
348
+
349
+ if [ \${#added[@]} -eq 0 ]; then
350
+ echo "ALREADY CURRENT: $f"
351
+ else
352
+ echo "UPDATED: $f (added: \${added[*]})"
353
+ fi
354
+ done
355
+
356
+ echo
357
+ echo "== team.devPrefix check =="
358
+ YAML=".specs/project/project.yaml"
359
+ if [ -f "$YAML" ] && ! grep -q "devPrefix:" "$YAML"; then
360
+ echo "MISSING: team.devPrefix in $YAML — ask the user for a short handle (e.g. GitHub username) and add it under a team: section."
361
+ fi
362
+ \`\`\`
363
+
364
+ After running it:
365
+ 1. Report per file: updated (with which sections were added), already-current, or skipped (file not found).
366
+ 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.
367
+ 3. Never overwrite existing content in any file; every append goes to the end of the file.
368
+
369
+ **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.`,
370
+ },
371
+ ];
372
+ /**
373
+ * Generates per-IDE slash/workflow command files from SLASH_COMMANDS.
374
+ * Parallel to IdeConfigGenerator — each IDE gets its own directory, file
375
+ * naming, and frontmatter format for the same shared command definitions.
376
+ */
377
+ class SlashCommandGenerator {
378
+ generate(projectDir, ide, commands = exports.SLASH_COMMANDS) {
379
+ if (commands.length === 0)
380
+ return;
381
+ const key = ide.toLowerCase();
382
+ for (const command of commands) {
383
+ const target = this.resolveTarget(key, command);
384
+ this.write(projectDir, target.dir, target.fileName, target.content);
385
+ }
386
+ if (key === 'codex') {
387
+ console.log('⚠️ SpecPilot slash commands were written to .codex/prompts/ for reference.\n' +
388
+ ' Codex only auto-discovers prompts from ~/.codex/prompts/ — copy them there manually:\n' +
389
+ ' cp .codex/prompts/specpilot-*.md ~/.codex/prompts/');
390
+ }
391
+ }
392
+ /**
393
+ * Writes only the command files missing on disk for the given IDE —
394
+ * used by `specpilot backfill` for existing projects. Never overwrites.
395
+ * Returns the names of the commands that were (or, in dry-run, would be) added.
396
+ */
397
+ backfillMissing(projectDir, ide, dryRun, commands = exports.SLASH_COMMANDS) {
398
+ const key = ide.toLowerCase();
399
+ const added = [];
400
+ for (const command of commands) {
401
+ const target = this.resolveTarget(key, command);
402
+ const filePath = (0, path_1.join)(projectDir, ...target.dir.split('/'), target.fileName);
403
+ if ((0, fs_1.existsSync)(filePath))
404
+ continue;
405
+ added.push(command.name);
406
+ if (!dryRun) {
407
+ this.write(projectDir, target.dir, target.fileName, target.content);
408
+ }
409
+ }
410
+ return added;
411
+ }
412
+ resolveTarget(ide, command) {
413
+ switch (ide) {
414
+ case 'claude-code':
415
+ return { dir: '.claude/commands', fileName: `specpilot-${command.name}.md`, content: this.claudeFrontmatter(command) + command.body };
416
+ case 'cursor':
417
+ return { dir: '.cursor/commands', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
418
+ case 'windsurf':
419
+ return { dir: '.windsurf/workflows', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
420
+ case 'antigravity':
421
+ return { dir: '.agent/workflows', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
422
+ case 'codex':
423
+ return { dir: '.codex/prompts', fileName: `specpilot-${command.name}.md`, content: this.simpleFrontmatter(command) + command.body };
424
+ default:
425
+ // vscode and unknown IDEs → GitHub Copilot prompt files
426
+ return { dir: '.github/prompts', fileName: `specpilot-${command.name}.prompt.md`, content: this.copilotFrontmatter(command) + command.body };
427
+ }
428
+ }
429
+ write(projectDir, dir, fileName, content) {
430
+ const fullDir = (0, path_1.join)(projectDir, ...dir.split('/'));
431
+ (0, fs_1.mkdirSync)(fullDir, { recursive: true });
432
+ (0, fs_1.writeFileSync)((0, path_1.join)(fullDir, fileName), content);
433
+ }
434
+ claudeFrontmatter(command) {
435
+ const lines = [`description: ${command.description}`];
436
+ if (command.argumentHint)
437
+ lines.push(`argument-hint: ${command.argumentHint}`);
438
+ if (command.allowedTools)
439
+ lines.push(`allowed-tools: ${command.allowedTools.join(', ')}`);
440
+ return `---\n${lines.join('\n')}\n---\n\n`;
441
+ }
442
+ simpleFrontmatter(command) {
443
+ return `---\ndescription: ${command.description}\n---\n\n`;
444
+ }
445
+ copilotFrontmatter(command) {
446
+ return `---\nmode: agent\ndescription: ${command.description}\n---\n\n`;
447
+ }
448
+ }
449
+ exports.SlashCommandGenerator = SlashCommandGenerator;
450
+ //# sourceMappingURL=slashCommandGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slashCommandGenerator.js","sourceRoot":"","sources":["../../src/utils/slashCommandGenerator.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,2BAA0D;AAW1D;;;GAGG;AACU,QAAA,cAAc,GAAmB;IAC5C;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,2DAA2D;QACxE,IAAI,EAAE;;;;;;;;8FAQoF;KAC3F;IACD;QACE,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,0DAA0D;QACvE,IAAI,EAAE;;;;;;wIAM8H;KACrI;IACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,6GAA6G;QAC1H,IAAI,EAAE;;;;;;;;;sOAS4N;KACnO;IACD;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,0EAA0E;QACvF,IAAI,EAAE;;;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WAAI,EAAC,UAAU,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,IAAA,cAAS,EAAC,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QACxC,IAAA,kBAAa,EAAC,IAAA,WAAI,EAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAEO,iBAAiB,CAAC,OAAqB;QAC7C,MAAM,KAAK,GAAG,CAAC,gBAAgB,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;QACtD,IAAI,OAAO,CAAC,YAAY;YAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;QAC/E,IAAI,OAAO,CAAC,YAAY;YAAE,KAAK,CAAC,IAAI,CAAC,kBAAkB,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1F,OAAO,QAAQ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;IAC7C,CAAC;IAEO,iBAAiB,CAAC,OAAqB;QAC7C,OAAO,qBAAqB,OAAO,CAAC,WAAW,WAAW,CAAC;IAC7D,CAAC;IAEO,kBAAkB,CAAC,OAAqB;QAC9C,OAAO,kCAAkC,OAAO,CAAC,WAAW,WAAW,CAAC;IAC1E,CAAC;CACF;AAlFD,sDAkFC"}
@@ -13,7 +13,6 @@ export declare class SpecArchiver {
13
13
  dryRun: boolean;
14
14
  }): Promise<ArchiveResult>;
15
15
  private buildTimestampedBlock;
16
- private extractFrontMatter;
17
16
  private archivePrompts;
18
17
  private archiveTasks;
19
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"specArchiver.d.ts","sourceRoot":"","sources":["../../src/utils/specArchiver.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;CACjB;AAaD,qBAAa,YAAY;IACvB,OAAO,CAAC,YAAY;IAQd,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAiBvF,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,kBAAkB;IAc1B,OAAO,CAAC,cAAc;IAiCtB,OAAO,CAAC,YAAY;CA2CrB"}
1
+ {"version":3,"file":"specArchiver.d.ts","sourceRoot":"","sources":["../../src/utils/specArchiver.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,OAAO,CAAC;CACjB;AAaD,qBAAa,YAAY;IACvB,OAAO,CAAC,YAAY;IAQd,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAiBvF,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,cAAc;IA2CtB,OAAO,CAAC,YAAY;CAqDrB"}