@infosuweb/prompt-rewriter 0.14.4 → 0.16.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/CHANGELOG.md CHANGED
@@ -7,6 +7,62 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ - No changes yet.
11
+
12
+ ## [0.16.0] - 2026-11-30
13
+
14
+ - GitLab CI job `publish-npm` publishes to npm from git tags with `NPM_TOKEN` (branch pipelines stay package/Pages only); architecture and distribution docs match that path.
15
+ - F6/F7: when analysis selects no project-doc sections, research still attaches related excerpts via keyword/path fallback (including Speckit/constitution paths when the questions name them); `no-related-docs` only when nothing matches.
16
+ - F6/F7: domain rules and Limits that settle open question conditions (for example “must not fork” when that was only a `sin`/`without` condition) are rejected so the unsettled point stays under Abierto / Evidence limits.
17
+ - F6/F7 web research on OpenAI now sets `tool_choice` to `required`, so the model must run `web_search` instead of answering from memory with no sources. A search that returns pages clears the single-source gap when project docs were also selected.
18
+ - F6/F7 research fidelity: open questions and gaps must not be rewritten as settled domain rules or Limits. Analysis is normalized to **Preguntado** / **Asumido** / **Falta** / **Decidir**. Evidence limits always come from real gaps when present; Hallazgos stay `ninguno` when there are no source-backed findings (no paraphrasing the request).
19
+ - F6/F7: when the model writes free prose in process learning without the four labels, the extension fills **Hallazgos** / **Contradicciones** / **Límites de la evidencia** / **Abierto** (or English) from evidence or "ninguno", so small local models no longer fail validation on that section. Repair rules now show the exact bullet template.
20
+ - F6/F7 research modes use XML user-prompt framing (like F8/F12) and lean F8-style project context, so local models no longer fail by echoing `## User request`. A leading echoed framing block that only restates the operator input is stripped. Framing errors say "Research prompt" instead of "Rewrite". New setting `promptRewriter.ollamaNumCtx` (default 8192) is sent to Ollama as `options.num_ctx` for every Ollama command.
21
+ - **Breaking:** F6 and F7 no longer write a Spec Kit `/speckit-plan`. They are now research commands, **Research Current Input (Prompt)** (F6, six F8 parts) and **Research Current Input (Spec)** (F7, eight F9 parts). Both start from the operator's questions, consult the related project docs and the backend's native web search in parallel, and append a research record (`## Investigación` / `## Research`): starting questions, analysis of the request, sources consulted, and process learning (findings, contradictions, evidence limits, open items). Only the questions are sent to web search, with URLs, e-mail addresses, mentions, chip tokens and the project's own names removed. Questions and sources are written by the extension, so no URL is invented; unknown URLs, plan sections, JSON, and added role lines are rejected or removed. Command ids and the F6/F7 keys are unchanged. New settings `promptRewriter.researchPromptSystemPromptRules` and `promptRewriter.researchSpecSystemPromptRules`; `loopSystemPromptRules` and `loopJsonSystemPromptRules` are deprecated and ignored.
22
+ - F9 Specify and F10 Specify JSON write the same eight-part specification (Introducción, Objetivos del Negocio, Escenarios de Usuario y Pruebas, Requisitos Funcionales `RF#`, Requisitos No Funcionales `RNF#`, Suposiciones, Entidades Clave, Límites); F8 stays six-part; F10 has no `expert_role`.
23
+ - F8 writes the six-part clarified request without a persona, and the method note goes to the output log.
24
+ - Rules panel and setting descriptions for F8/F9/F10 match the six-part / eight-part contracts (no persona; method note to the Output log).
25
+ - Raise the default completion budget to 8192 and retry once when gpt-5-class models return empty text after spending `max_completion_tokens` on reasoning (F9 empty rewrite).
26
+ - F9 accepts numbered/Spanish/level-3 part headings and names the missing part in the repair error instead of rejecting a complete specification for heading shape alone.
27
+ - F8 surfaces a failure after a second failed repair (except unchanged refinements); named limit technologies stay under Limits; part order is enforced; Specify strict rules no longer mention persona; empty research source titles log as URL-only.
28
+
29
+ ## [0.15.0] - 2026-11-27
30
+
31
+ ### Added
32
+
33
+ - F8 analyzes the request against the project docs before rewriting it. It indexes the workspace rules, README/AGENTS/CLAUDE, the extension manifest (commands with their keys, settings, npm scripts), `specs/`, the docs folder and the CHANGELOG by section; one model call picks the sections the input concerns (shared with the expert-research subject detection), and the rewrite reads those sections in full instead of the first 6,000 characters of the root docs. The rewrite may now name what the input refers to with the project's exact term (for example "F12 (Suggest Next Prompt)" or `promptRewriter.model`), without adding tasks. The selected sections are listed in the Output log. If the analysis fails, F8 falls back to the previous lean context. Setting: `promptRewriter.rewriteProjectAnalysis` (default on).
34
+ - F8 detects the subject of the request (from the operator text, the last chat reply and the project summary) and uses the backend's native web search (OpenAI Responses `web_search`, Anthropic web search, Gemini Google Search grounding) to find how practitioners of that subject approach the task and which tools they use. It appends a short block ("Cómo lo abordaría un experto en …" / "How an expert in … would approach it") with the method and only the tools the workspace already has. The sources and the recommended tools the workspace lacks go to the Output log only. The method is tailored to the project: a local profile (project type, publish settings, whether CI publishes, public stack names, and npm scripts with their commands, with the project's own package names, URLs and e-mail addresses removed) goes with the research, so steps name the project's own scripts and tools (for example `npm run publish:npm` instead of generic `npm publish` advice). The operator text is never sent, and search queries carry only the general practice for the stack. When the input asks how this project does something ("¿cómo se despliega este proyecto en npm?"), the analysis marks it as project-scoped: the research also receives the selected doc sections (own package name redacted, then restored in the result) as the primary source, and the block is titled "Cómo se hace en este proyecto (…)" / "How this project does it (…)" and follows the documented procedure, with web sources only adding checks the docs leave out. The last reply is read from the most recently active Cursor or Claude Code chat of the workspace. If the backend has no web search (Ollama, OpenAI-compatible, Cursor Agents), the search finds no sources, or it fails, the block is omitted. Results are cached per subject for 24 hours. Pressing F8 again replaces the block instead of duplicating it. Even a single word is researched when it names a task ("tests", "despliega"), resolved against the last chat reply; conversational input (status questions, acknowledgements, reactions) gets no block. The block follows the operator language as judged by the detector. Setting: `promptRewriter.rewriteExpertResearch` (default on).
35
+
36
+ ### Changed
37
+
38
+ - F8 no longer adds an expert role or persona line (`Act as …`). A role line the operator wrote is kept as their text; one the model adds is removed.
39
+ - When the prompt is already clear and the model returns it unchanged, F8 now keeps the operator text instead of failing.
40
+
41
+ ### Fixed
42
+
43
+ - F6–F12 no longer treat a normal sentence that mentions an error ("me ha dado este error", "the error message is wrong") as a pasted console log. Such lines were hidden from the model as a placeholder, so F8 could return an invented request ("Address the request identified by …"). Only log-shaped text (`Error:`, `TypeError`, stack frames, timestamps, `[error]`, error codes) is protected now, and F8 stops with a message when the input is only attachments, mentions, or pasted logs.
44
+ - F6–F12 recognize Spanish role lines (`Actúa como …`), so a prompt that already has a role no longer gets a second one; when two role lines appear, the operator's own is kept.
45
+ - F6–F12 no longer overwrite another field when focus moves during a transform: the result is left on the clipboard with a warning instead (only when the captured chat input can be fingerprinted; otherwise behavior is unchanged).
46
+ - F6–F12 no longer rewrite stale clipboard content when Cmd+C copies nothing; the user's clipboard is restored in that case.
47
+ - Pressing F6–F12 again while a transform is running is ignored with a warning instead of starting a second, racing transform.
48
+
49
+ ## [0.14.5] - 2026-11-01
50
+
51
+ ### Added
52
+
53
+ - F8 rewrite makes the same idea coherent: it may join fragments the input already supports, and a shorter statement of that idea is kept. It still rejects a different task.
54
+ - F9/F10 rebranded as **Specify** — Spec Kit `/speckit-specify` feature specification (markdown/JSON) after F8, with bounds-only context (always skip chat), Input/Why/Independent Test validation, and Assumptions from rules/docs instead of inventing product scope.
55
+ - F7/F6 emit Spec Kit `/speckit-plan` (markdown/JSON) instead of Grill-with-Docs loops; F12 suggests the next Spec Kit–aware agent step.
56
+
57
+ ### Fixed
58
+
59
+ - OpenAI-compatible requests use `max_completion_tokens` and omit non-default `temperature` for gpt-5 / gpt-4.1 / o-series models (with one retry if a provider rejects the classic parameters), fixing HTTP 400 on newer chat models.
60
+ - F8 rewrite keeps the request when the model puts the expert role and the rewritten statement on the same line.
61
+ - OpenAI rewrite no longer sends an Anthropic or Google key. Saving Claude or Gemini keeps that key on its own provider, and Setup restores the matching key when switching providers.
62
+ - F8 rewrite validation — positive invention detection with retry and safe fallback instead of brittle token-recall rejections.
63
+ - Preserve attached files, screenshots, and pasted console error blocks during rewrite (verbatim placeholders and extended attachment detection).
64
+ - Attachment handling after F8 — keep `@.env` when Cursor copy serializes that way; re-chip to U+FFFC only when the original capture already contained chips (fixes invisible attachments from bare U+FFFC writes).
65
+
10
66
  ## [0.14.4] - 2026-09-08
11
67
 
12
68
  - **0.14.2-rc.40**: Ground worker summaries in bounded verbatim excerpts, preserve exact rules/skills and source-channel provenance, defer unused worker validation, and require local RC installation in both Cursor and VS Code.
package/README.md CHANGED
@@ -11,12 +11,12 @@ Independent commands:
11
11
 
12
12
  | Command | Shortcut | Description |
13
13
  | --- | --- | --- |
14
- | **Rewrite Current Input** | **F8** | Cleans and iteratively improves wording without inventing ideas, and prefixes a task/project-grounded expert persona (`Act as a …`). Uses skills plus a bounded 6,000-character view of workspace rules and configured root docs; skips chat history, the docs folder, and global rules. Repeating F8 must produce a material refinement rather than the same result. |
15
- | **Expand Current Input** | **F9** | Formats a Cursor-agent-ready Grill-with-Docs prompt starting with a context-grounded `Act as a …` expert role, then Goal / Constraints / Non-Goals / Acceptance Criteria, using the full shared context stack (including root docs when enabled). |
16
- | **Expand Current Input (JSON)** | **F10** | Same expand behavior, but the output is a JSON object (`expert_role`, `goal`, `constraints`, `non_goals`, `acceptance_criteria`). |
17
- | **Expand Current Input (Loop)** | **F7** | Same expand flow as F9, but writes a Grill-with-Docs **loop** (iteration structure to repeat work until done), not a one-shot prompt. Adds an optional `### Loop` section from iteration details already in the input; does not execute the loop. |
18
- | **Expand Current Input (Loop JSON)** | **F6** | Same loop behavior as F7, but the output is a JSON object (`expert_role`, `goal`, `loop`, `constraints`, `non_goals`, `acceptance_criteria`). |
19
- | **Suggest Next Prompt** | **F12** | Uses chat history plus bounded project identity to propose the next ready-to-send agent prompt with a grounded expert role (Grill-with-Docs is used only as internal reasoning, not written into the input). |
14
+ | **Rewrite Current Input** | **F8** | Clarifies the same task into six parts in order (system context, what it does, actor, use cases, domain rules, limits). Adds no persona line. APIs and a main entity appear only when the draft already supports them. Uses skills plus a bounded 6,000-character view of workspace rules and configured root docs; skips chat history, the docs folder, and global rules. Method research goes to the Output log, not the chat field. Repeating F8 must produce a material refinement rather than the same result. |
15
+ | **Specify Current Input** | **F9** | Writes an eight-part feature specification (introduction, business objectives, user scenarios and testing, functional requirements `RF#`, non-functional requirements `RNF#`, assumptions, key entities, limits). Does not run F8 and does not start with `Act as …`. Uses rules/docs as bounds; **always skips chat history** and built-in architecture defaults. Does not write plan, tasks, or implementation. |
16
+ | **Specify Current Input (JSON)** | **F10** | Same eight parts as F9 Specify, as structured JSON (no `expert_role`). Also skips chat history. |
17
+ | **Research Current Input (Spec)** | **F7** | Researches the questions in the input (related project docs, web search, model knowledge) and writes the eight-part F9 specification plus a research record: starting questions, analysis of the request, sources consulted, and process learning. Does not plan, send, or run anything. |
18
+ | **Research Current Input (Prompt)** | **F6** | Same research as F7, written as the six F8 prompt parts plus the research record. |
19
+ | **Suggest Next Prompt** | **F12** | Uses chat history plus bounded project identity to propose the next ready-to-send agent prompt (Spec Kit plan/tasks/implement/converge when the chat is in SDD; otherwise a concrete repo action). |
20
20
  | **Rewrite Prompt** | — | Rewrites the current editor selection and shows a diff before replacing it. |
21
21
  | **Rewrite Clipboard Prompt** | — | Rewrites the current clipboard text and copies the result back for a manual paste. |
22
22
  | **Open Configuration** | — | Opens the sidebar panel to pick backend + model and save. |
@@ -25,13 +25,13 @@ Independent commands:
25
25
  | **Select Ollama Model** | — | Lists local Ollama models only (same `GET /api/tags` catalog Hermes uses) and saves `promptRewriter.ollamaModel`. |
26
26
  | **Import Hermes Model Settings** | — | Copies Hermes Agent’s primary local model (`hermes config get model.*`) into Prompt Rewriter Ollama settings. |
27
27
 
28
- Every F6-F12 transformation enforces a specific expert role, validates its output format and scope, rejects invented operational work or file paths, and makes one focused repair attempt when a model response fails those checks. API keys, prompts, file contents, file names, and generated text are never sent to usage metrics.
28
+ F12 enforces a specific expert role. F6/F7, F8 and F9/F10 do not add a persona. Every F6–F12 transformation validates its output format and scope, rejects invented operational work or file paths, and makes one focused repair attempt when a model response fails those checks. API keys, prompts, file contents, file names, and generated text are never sent to usage metrics.
29
29
 
30
30
  ## Prerequisites
31
31
 
32
32
  - Visual Studio Code 1.80+ or Cursor (any recent build that installs standard VS Code extensions)
33
33
  - To **build** the `.vsix` from source (not required if you already have the installer file): Node.js 22 or later and npm 10 or later
34
- - For **Rewrite Current Input**, **Expand Current Input**, and **Rewrite Clipboard Prompt**: a configured backend (Ollama with a pulled model, cloud API key, or Cursor Agent CLI on PATH)
34
+ - For **Rewrite Current Input**, **Specify Current Input**, and **Rewrite Clipboard Prompt**: a configured backend (Ollama with a pulled model, cloud API key, or Cursor Agent CLI on PATH)
35
35
  - For **Cursor Agents** backend: Cursor Agent CLI (`agent` / `cursor-agent`) on `PATH`, authenticated via `agent login` or `CURSOR_API_KEY`
36
36
  - For current-input commands on macOS: Accessibility permission for Cursor (or VS Code) so `osascript` can send Cmd+A / Cmd+C / Cmd+V to the focused field
37
37
 
@@ -179,19 +179,21 @@ Open **Settings** and set:
179
179
  | `promptRewriter.ollamaBaseUrl` | Local Ollama server used when `backend` is `ollama`. Default: `http://localhost:11434` |
180
180
  | `promptRewriter.ollamaModel` | Ollama model used by those commands. Default: `qwen2.5-coder:7b` |
181
181
  | `promptRewriter.ollamaTimeoutMs` | Ollama request timeout in ms. Default: `180000` (3 minutes) |
182
+ | `promptRewriter.ollamaNumCtx` | Context window sent to Ollama as `options.num_ctx` for every Ollama command. Default: `8192`. Raise it if local models truncate long prompts. |
182
183
  | `promptRewriter.contextFolder` | Workspace-relative folder of rules/context for **F6-F12**. Default: `.cursor/rules` |
183
- | `promptRewriter.includeGlobalCursorRules` | When true, **F6/F7/F9/F10** load Cursor global/user rules from `~/.cursor/rules`. **F8/F12** always skip global rules (lean context). Default: `true` |
184
+ | `promptRewriter.includeGlobalCursorRules` | When true, **F9/F10** load Cursor global/user rules from `~/.cursor/rules`. **F6/F7 Research** and **F8/F12** always skip global rules (lean context). Default: `true` |
184
185
  | `promptRewriter.disabledGlobalCursorRuleFiles` | Global rule file names under `~/.cursor/rules` excluded from F6/F7/F9/F10 even when global rules are enabled. Default: `[]` |
185
186
  | `promptRewriter.disabledContextRuleFiles` | Workspace rule file names (relative to `contextFolder`) excluded from F6-F12. Default: `[]` |
186
- | `promptRewriter.includeRootDocs` | When true, **F6/F7/F9/F10** load `AGENTS.md`, `README.md`, and `.cursorrules`; **F8/F12** include them only within their bounded 6,000-character lean context. Default: `true` |
187
- | `promptRewriter.docsFolder` | Docs folder for **F6/F7/F9/F10** (`.md`/`.mdc`/`.txt`). Default: `docs`. Empty disables it. **F8/F12** always skip the docs folder. |
188
- | `promptRewriter.includeArchitectureDefaults` | When true, F6-F12 inject built-in SOLID + hexagonal constraints for software work. Default: `true` |
189
- | `promptRewriter.includeLastChatResponse` | When true, **F6/F7/F9/F10** include full chat history from Cursor agent transcripts (current conversation turns + older transcripts when budget allows). **F8** always skips chat history (lean rewrite). **F12** always loads it. Default: `true` |
190
- | `promptRewriter.rewriteSystemPromptRules` | Custom system prompt for **F8 Rewrite**. Empty uses the built-in strict defaults (no inference, preserve ambiguity) and always prefixes a context-grounded expert agent persona. Editable in the Rules tab. |
191
- | `promptRewriter.expandSystemPromptRules` | Custom system prompt for **F9 Expand**. Empty uses built-in Grill-with-Docs expand rules with a context-grounded `Act as a …` expert role line. Editable in the Rules tab. |
192
- | `promptRewriter.expandJsonSystemPromptRules` | Custom system prompt for **F10 Expand JSON**. Empty uses built-in JSON expand rules with required `expert_role` (`Act as a …`). Editable in the Rules tab. |
193
- | `promptRewriter.loopSystemPromptRules` | Custom system prompt for **F7 Loop**. Empty uses built-in Grill-with-Docs loop rules with a context-grounded `Act as a …` expert role line. Editable in the Rules tab. |
194
- | `promptRewriter.loopJsonSystemPromptRules` | Custom system prompt for **F6 Loop JSON**. Empty uses built-in JSON loop rules with required `expert_role` (`Act as a …`). Editable in the Rules tab. |
187
+ | `promptRewriter.includeRootDocs` | When true, current-input modes load `AGENTS.md`, `README.md`, and `.cursorrules`; **F6/F7 Research** and **F8/F12** include them only within their bounded 6,000-character lean context. Default: `true` |
188
+ | `promptRewriter.docsFolder` | Docs folder for **F9/F10** (`.md`/`.mdc`/`.txt`). Default: `docs`. Empty disables it. **F6/F7 Research** and **F8/F12** always skip the docs folder (F6/F7 still load related sections through research evidence). |
189
+ | `promptRewriter.includeArchitectureDefaults` | When true, F8 and F12 inject built-in SOLID + hexagonal constraints for software work. **F6/F7 Research** and **F9/F10 Specify** skip them. Default: `true` |
190
+ | `promptRewriter.includeLastChatResponse` | Chat history from Cursor agent transcripts. **F6/F7 Research** and **F9/F10 Specify** always skip chat history. **F8** always skips chat history (lean rewrite). **F12** always loads it. Default: `true` |
191
+ | `promptRewriter.rewriteSystemPromptRules` | Custom system prompt for **F8 Rewrite**. Empty uses the built-in six-part clarified request (no persona). Custom rules still must pass the six-part and mechanism checks. Editable in the Rules tab. |
192
+ | `promptRewriter.expandSystemPromptRules` | Custom system prompt for **F9 Specify**. Empty uses the built-in eight-part specification without a persona and without running F8 first. Custom rules still must pass the eight-part checks. Editable in the Rules tab. |
193
+ | `promptRewriter.expandJsonSystemPromptRules` | Custom system prompt for **F10 Specify JSON**. Empty uses built-in JSON for the same ten parts as F9 (no `expert_role`). Editable in the Rules tab. |
194
+ | `promptRewriter.researchSpecSystemPromptRules` | Custom system prompt for **F7 Research Spec**. Empty uses the built-in rules (eight F9 parts plus the research record, no persona line). Editable in the Rules tab. |
195
+ | `promptRewriter.researchPromptSystemPromptRules` | Custom system prompt for **F6 Research Prompt**. Empty uses the built-in rules (six F8 parts plus the research record, no persona line). Editable in the Rules tab. |
196
+ | `promptRewriter.loopSystemPromptRules`, `promptRewriter.loopJsonSystemPromptRules` | **Deprecated and ignored** since 0.16.0 (they configured the old F7/F6 Spec Kit plan). Each F6/F7 run notes in the Output channel when they still hold a value. |
195
197
 
196
198
  - Prefer **User** settings over **Workspace** settings so the API key is not stored in the repository.
197
199
  - **Save & apply** writes User settings and clears any Workspace overrides for the same keys, so F6–F12 match the panel.
@@ -222,7 +224,7 @@ The simplest way to get F6–F12 working with the model you want:
222
224
  - **Google** — set your Google AI Studio key + Gemini model (default **gemini-3.6-flash**). The Setup model list is loaded from that API key via the native `/v1beta/models` catalog.
223
225
  - **Cursor Agents** — Cursor Agent CLI (`agent`) in ask/print mode (Composer and account models).
224
226
  - **Compatible** — Hermes proxy / any OpenAI-compatible endpoint (free routes can be slow).
225
- - **Rules** — configure agent context settings; edit **F8 Rewrite / F9 Expand / F10 Expand JSON / F7 Loop / F6 Loop JSON** system prompts (labeled by purpose in the panel); toggle individual global (`~/.cursor/rules`) and workspace rule files on/off; create or edit rule files in-panel; create/edit skill files (`SKILL.md`); assign named task prompts to skills (stored as `## Task:` sections). Click **Save settings** after toggling includes or editing prompt rules.
227
+ - **Rules** — configure agent context settings; edit **F8 Rewrite / F9 Specify / F10 Specify JSON / F7 Research Spec / F6 Research Prompt** system prompts (labeled by purpose in the panel); toggle individual global (`~/.cursor/rules`) and workspace rule files on/off; create or edit rule files in-panel; create/edit skill files (`SKILL.md`); assign named task prompts to skills (stored as `## Task:` sections). Click **Save settings** after toggling includes or editing prompt rules.
226
228
  4. On **Setup**, pick a **Model** from the icon list (or type a custom id), then **Save & apply**.
227
229
  5. Use **F6** / **F7** / **F8** / **F9** / **F10** / **F12** in Cursor chat.
228
230
 
@@ -325,6 +327,8 @@ npm run typecheck
325
327
  npm test
326
328
  ```
327
329
 
330
+ `npm test` also runs `check:inventory`, which fails when a command, shortcut, or setting is not listed in [`specs/inventory.md`](specs/inventory.md).
331
+
328
332
  Watch mode for compilation:
329
333
 
330
334
  ```bash
@@ -349,6 +353,9 @@ Release flow:
349
353
  2. Commit that changelog edit (working tree must be clean before the bump).
350
354
  3. Run `npm run release:patch`, `npm run release:minor`, or `npm run release:major`.
351
355
  4. That runs typecheck/tests, bumps `package.json` + `package-lock.json`, verifies the changelog section, creates commit `chore(release): X.Y.Z` and tag `vX.Y.Z`, then packages the `.vsix` under `versions/`.
356
+ 5. Push the commit and tag. GitLab CI job `publish-npm` publishes `@infosuweb/prompt-rewriter` to npm from the tag using the masked CI/CD variable `NPM_TOKEN` (prerelease versions → dist-tag `rc`; stable → `latest`). Branch pipelines do not publish to npm.
357
+
358
+ Set `NPM_TOKEN` once in GitLab → Settings → CI/CD → Variables (masked, protected if tags are protected). No laptop `npm login` is required for the tag publish path.
352
359
 
353
360
  Do not edit `version` by hand in feature commits. Use the release scripts only.
354
361
 
@@ -358,7 +365,9 @@ Do not edit `version` by hand in feature commits. Use the release scripts only.
358
365
 
359
366
  This is the main flow. It uses the standard clipboard API plus macOS keystrokes (`osascript`). It does not use Cursor-internal APIs and never presses Enter.
360
367
 
361
- It rewrites **only the prompt text**. F8 uses slash skills (`SKILL.md`), architecture defaults, and a bounded 6,000-character view of workspace `.cursor/rules` plus configured root docs to ground the expert role and wording. It deliberately skips chat history, the docs folder, and global rules so transcripts or heavy documentation cannot replace the operator's task. `@` mentions and attachment placeholders are preserved; slash skills are kept on leading lines after replace.
368
+ It rewrites **only the prompt text** into the six parts (system context, what it does, actor, use cases, domain rules, limits) and adds no persona (`Act as …`) line. Before rewriting, F8 analyzes the request against the project docs: it indexes the workspace rules, `README.md`/`AGENTS.md`/`CLAUDE.md`, the extension manifest (commands with their keys, settings, npm scripts), `specs/`, the docs folder and `CHANGELOG.md` by section, and one model call picks the sections the input concerns. The rewrite reads those sections in full, so it can name what the input refers to with the project's exact term (for example "F12 (Suggest Next Prompt)" or `promptRewriter.model`) without adding tasks. Chat history is never used as the task; the last chat reply only helps resolve references. `@` mentions, attachment placeholders and pasted console logs are preserved; slash skills are kept on leading lines after replace.
369
+
370
+ After the rewrite, F8 can research how a practitioner would approach the subject (native web search on OpenAI Responses, Anthropic, or Gemini). The method note and its sources go to the **Prompt Rewriter Output log** only — they are absent from the chat field. Conversational input gets no note. Backends without native search omit it. Settings: `promptRewriter.rewriteProjectAnalysis`, `promptRewriter.rewriteExpertResearch`.
362
371
 
363
372
  Pressing F8 again on its own output starts a refinement pass. If the model returns the same prompt, the extension performs one compact repair that improves precision, traceability, actionability, or verifiability without changing scope.
364
373
 
@@ -380,28 +389,27 @@ If the focused input is empty, the extension shows an error and does not call Ol
380
389
 
381
390
  F6–F12 replace the focused chat input in place (Accessibility write, or Cmd+A / Cmd+V paste). Keep the chat input focused while the model runs for best results.
382
391
 
383
- ### Expand the current input (faithful prompt engineer, macOS)
392
+ ### Specify the current input (Spec Kit `/speckit-specify`, macOS)
384
393
 
385
- Same capture/replace flow as **Rewrite Current Input**, with the same shared context stack (last chat, skills, rules/docs, architecture defaults), but optimized for Cursor agents:
394
+ Same capture/replace flow as **Rewrite Current Input**, writing the specification directly (F9 does not run F8):
386
395
 
387
- - Output format: Grill-with-Docs sections (`### Goal`, `### Constraints`, `### Non-Goals`, `### Acceptance Criteria`).
388
- - Loads project context, in order: Cursor global rules (`~/.cursor/rules`), `promptRewriter.contextFolder` (default `.cursor/rules`), root docs (`AGENTS.md`, `README.md`, `.cursorrules`), then `promptRewriter.docsFolder` (default `docs`).
389
- - When the input includes slash skills (for example `/grill-with-docs`), Expand loads matching `SKILL.md` files from workspace/user skill folders — including Hermes `~/.hermes/skills` — and nested `/skill` references, then builds the prompt from what those skills expect.
390
- - Slash skills are kept on leading lines of the expanded text so the invocation remains visible after replace.
391
- - Also loads **chat history** from Cursor agent transcripts — the current conversation in full (user + assistant turns) plus older project transcripts when the character budget allows (toggle with `promptRewriter.includeLastChatResponse`) so follow-up prompts can reference prior context.
392
- - Cursor global rules are injected into the Expand LLM context and must be reflected as Constraints so expanded prompts carry them implicitly.
393
- - When project documentation is present, Expand instructs the model to put relevant doc requirements into Constraints / Acceptance Criteria (without inventing product scope from the docs).
394
- - Always injects built-in **SOLID + hexagonal** defaults for software tasks (disable with `promptRewriter.includeArchitectureDefaults: false`).
395
- - Forbids inventing stacks, features, examples, or speculative gaps.
396
+ - Output format: an eight-part feature specification (`# Especificación de …`, Introducción, Objetivos del Negocio, Escenarios de Usuario y Pruebas with Actor/Precondición/steps/Postcondición, Requisitos Funcionales `RF#`, Requisitos No Funcionales `RNF#`, Suposiciones, Entidades Clave, Límites). An F8 six-part result used as input is specified as behavior — not compressed into one sentence. No persona line, plan, tasks, or implementation.
397
+ - Loads **bounds** context, in order: Cursor global rules (`~/.cursor/rules`), `promptRewriter.contextFolder` (default `.cursor/rules`), root docs (`AGENTS.md`, `README.md`, `.cursorrules`), then `promptRewriter.docsFolder` (default `docs`). Rules/docs go into Assumptions or Limits (or phrasing bounds) — not new product scope.
398
+ - **Always skips chat history**, like F6/F7 Research. F9/F10 ignore `promptRewriter.includeLastChatResponse`.
399
+ - When the input includes slash skills (for example `/speckit-specify`), Specify loads matching `SKILL.md` files from workspace/user skill folders — including Hermes `~/.hermes/skills` — and nested `/skill` references, then builds the prompt from what those skills expect.
400
+ - Slash skills are kept on leading lines of the specified text so the invocation remains visible after replace.
401
+ - Does **not** inject built-in architecture defaults (those remain for plan commands).
402
+ - Forbids inventing stacks, features, examples, or speculative gaps. Derive scenarios/RF/RNF/entities only from the input plus bounds.
396
403
 
397
- 1. Put global Cursor rules in `~/.cursor/rules`; put project rules in `.cursor/rules` and optional docs in `docs/` / `AGENTS.md` / `README.md`.
398
- 2. Optionally include a slash skill such as `/grill-with-docs` (skills live under `.agents/skills`, `.cursor/skills`, `~/.agents/skills`, or Hermes `~/.hermes/skills`).
399
- 3. Focus the Cursor chat input and type a rough prompt. Do not send it.
400
- 4. Press **Ctrl+Shift+Alt+E** or **F9**.
401
- 5. Review the expanded text in the input. The message is not sent.
402
- 6. If a slash skill appears as plain text (not a teal chip), re-select it from Cursor’s skill menu so it is marked again — the extension cannot recreate Cursor’s chip UI.
404
+ 1. Optional: run F8 first so the chat input is a six-part clarified request; F9 also accepts a rough one-task draft.
405
+ 2. Put global Cursor rules in `~/.cursor/rules`; put project rules in `.cursor/rules` and optional docs in `docs/` / `AGENTS.md` / `README.md`.
406
+ 3. Optionally include a slash skill such as `/speckit-specify` (skills live under `.agents/skills`, `.cursor/skills`, `~/.agents/skills`, or Hermes `~/.hermes/skills`).
407
+ 4. Focus the Cursor chat input. Do not send it.
408
+ 5. Press **Ctrl+Shift+Alt+E** or **F9**.
409
+ 6. Review the specification in the input. The message is not sent.
410
+ 7. If a slash skill appears as plain text (not a teal chip), re-select it from Cursor’s skill menu so it is marked again — the extension cannot recreate Cursor’s chip UI.
403
411
 
404
- Use **Rewrite** when you only want cleaner wording. Use **Expand** when you want a longer agent-ready Grill-with-Docs prompt.
412
+ Use **Rewrite** (F8) when you want the six-part clarified request. Use **Specify** (F9) when you want the eight-part specification. Use **Research** (F6/F7) when the input carries open questions that should be investigated first.
405
413
 
406
414
  ### Suggest the next prompt from chat context (macOS)
407
415
 
@@ -414,17 +422,23 @@ Uses chat history from agent transcripts plus the same bounded project identity
414
422
 
415
423
  If Ollama times out, raise `promptRewriter.ollamaTimeoutMs` or switch `promptRewriter.ollamaModel` to `qwen2.5-coder:7b` (large models like 32b often exceed 60s with long context).
416
424
 
417
- ### Expand the current input as JSON (macOS)
425
+ ### Specify the current input as JSON (macOS)
418
426
 
419
- Same behavior as **Expand Current Input** (Cursor global rules, rules folder, root docs, docs folder, SOLID/hexagonal defaults, faithful expansion), but the result is pretty-printed JSON:
427
+ Same eight parts as **Specify Current Input** (F9), but pretty-printed JSON (no `expert_role`):
420
428
 
421
429
  ```json
422
430
  {
423
- "expert_role": "Act as a …",
424
- "goal": "...",
425
- "constraints": ["..."],
426
- "non_goals": ["..."],
427
- "acceptance_criteria": ["..."]
431
+ "feature_name": "...",
432
+ "status": "Draft",
433
+ "input": "...",
434
+ "introduction": "...",
435
+ "business_objectives": ["…"],
436
+ "user_scenarios": [{ "title": "...", "actor": "...", "precondition": "...", "steps": ["…"], "postcondition": "..." }],
437
+ "functional_requirements": ["RF1: …"],
438
+ "non_functional_requirements": ["RNF1: …"],
439
+ "assumptions": ["…"],
440
+ "key_entities": ["…"],
441
+ "limits": ["…"]
428
442
  }
429
443
  ```
430
444
 
@@ -432,37 +446,23 @@ Same behavior as **Expand Current Input** (Cursor global rules, rules folder, ro
432
446
  2. Press **Ctrl+Shift+Alt+J** or **F10**.
433
447
  3. Review the JSON in the input. The message is not sent.
434
448
 
435
- ### Expand the current input as a loop (macOS)
436
-
437
- Same capture/replace flow and shared context stack as **Expand Current Input** (F9), but the result is a **loop structure** (iteration instructions to repeat work until done), not a one-shot prompt. It writes the loop into the chat input; it does not execute the loop.
438
-
439
- - Output format: Grill-with-Docs sections (`### Goal`, `### Loop`, `### Constraints`, `### Non-Goals`, `### Acceptance Criteria`).
440
- - `### Loop` is included only when the input already has iteration details (what to repeat, when to stop, cadence). Interval, cadence, and stop conditions are not invented.
449
+ ### Research the current input (macOS)
441
450
 
442
- 1. Focus the Cursor chat input and type a rough request. Do not send it.
443
- 2. Press **F7**.
444
- 3. Review the loop in the input. The message is not sent.
451
+ **F6** and **F7** start from the questions in the chat input (sentences ending in `?`, or lines such as `Dudas:` / `No sé …`). When there is no explicit question, the whole input is treated as the request.
445
452
 
446
- ### Expand the current input as a JSON loop (macOS)
453
+ 1. Related project docs are selected with the same section analysis F8 uses.
454
+ 2. In parallel, the backend's native web search (OpenAI, Anthropic, Google) researches the questions. **Only the questions are sent**, after removing URLs, e-mail addresses, `@` mentions, chip tokens, and the project's own names. Backends without web search skip this step and the record says so.
455
+ 3. The model writes the artifact from that evidence:
456
+ - **F7 Research Spec**: the eight F9 parts plus `## Investigación` / `## Research`.
457
+ - **F6 Research Prompt**: the six F8 parts plus the same record.
447
458
 
448
- Same behavior as **Expand Current Input (Loop)** (F7), but the result is pretty-printed JSON:
449
-
450
- ```json
451
- {
452
- "expert_role": "Act as a …",
453
- "goal": "...",
454
- "loop": ["..."],
455
- "constraints": ["..."],
456
- "non_goals": ["..."],
457
- "acceptance_criteria": ["..."]
458
- }
459
- ```
459
+ The research record has four subsections: starting questions and sources consulted (written by the extension, so no URL is invented), analysis of the request (what is asked, assumed, missing, and to be decided), and process learning (**Hallazgos**, **Contradicciones**, **Límites de la evidencia**, **Abierto**). Conflicting sources and unanswered questions stay open instead of being presented as settled. Findings shape the parts; they never become new tasks.
460
460
 
461
- `loop` is omitted when the input has no iteration details.
461
+ Both commands use lean project context like F8 (root docs within 6,000 characters; no chat history, no global rules, no docs folder as a bulk dump — related doc sections still arrive through research evidence), skip built-in architecture defaults, add no `Act as …` line, write no plan and no JSON, and never send the message or start an agent turn. The user prompt uses XML framing (not `## User request`) so local models are less likely to echo scaffolding. With Ollama, raise `promptRewriter.ollamaNumCtx` if long prompts are truncated.
462
462
 
463
- 1. Focus the Cursor chat input and type a rough request. Do not send it.
464
- 2. Press **F6**.
465
- 3. Review the JSON loop in the input. The message is not sent.
463
+ 1. Focus the Cursor chat input and type the request with your questions. Do not send it.
464
+ 2. Press **F7** (spec) or **F6** (prompt).
465
+ 3. Review the artifact in the input. The message is not sent.
466
466
 
467
467
  ### Rewrite a selection in the editor
468
468
 
@@ -492,12 +492,12 @@ If the clipboard is empty, the extension shows an error and does not call Ollama
492
492
 
493
493
  | Command | Default shortcut | Context |
494
494
  | --- | --- | --- |
495
- | **Rewrite Current Input** | `Ctrl+Shift+Alt+P` or `F8` | Global. Strict cleaner |
496
- | **Expand Current Input** | `Ctrl+Shift+Alt+E` or `F9` | Global. Faithful prompt engineer (markdown) |
497
- | **Expand Current Input (JSON)** | `Ctrl+Shift+Alt+J` or `F10` | Global. Same expand, JSON output |
498
- | **Expand Current Input (Loop)** | `F7` | Global. Same expand as F9, writes a loop structure |
499
- | **Expand Current Input (Loop JSON)** | `F6` | Global. Same loop as F7, JSON output |
500
- | **Suggest Next Prompt** | `Ctrl+Shift+Alt+N` or `F12` | Global. Next ready-to-send prompt from last chat |
495
+ | **Rewrite Current Input** | `Ctrl+Shift+Alt+P` or `F8` | Global. Makes the same idea coherent |
496
+ | **Specify Current Input** | `Ctrl+Shift+Alt+E` or `F9` | Global. Spec Kit specify (markdown) |
497
+ | **Specify Current Input (JSON)** | `Ctrl+Shift+Alt+J` or `F10` | Global. Spec Kit specify (JSON) |
498
+ | **Research Current Input (Spec)** | `F7` | Global. Research spec (eight parts + research record) |
499
+ | **Research Current Input (Prompt)** | `F6` | Global. Research prompt (six parts + research record) |
500
+ | **Suggest Next Prompt** | `Ctrl+Shift+Alt+N` or `F12` | Global. Next Spec Kit–aware prompt from last chat |
501
501
  | **Rewrite Prompt** | `Ctrl+Alt+Shift+R` (macOS: `Cmd+Alt+Shift+R`) | Editor focused |
502
502
  | **Rewrite Clipboard Prompt** | `Ctrl+Alt+Shift+C` (macOS: `Cmd+Alt+Shift+C`) | Global |
503
503
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@infosuweb/prompt-rewriter",
3
3
  "displayName": "Prompt Rewriter",
4
4
  "description": "Rewrite a selected prompt so it is clearer and more precise, without adding new ideas.",
5
- "version": "0.14.4",
5
+ "version": "0.16.0",
6
6
  "publisher": "suweb",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -52,7 +52,8 @@
52
52
  "onCommand:promptRewriter.selectOllamaModel",
53
53
  "onCommand:promptRewriter.selectLlmBackend",
54
54
  "onCommand:promptRewriter.selectActiveModel",
55
- "onCommand:promptRewriter.importHermesSettings"
55
+ "onCommand:promptRewriter.importHermesSettings",
56
+ "onCommand:promptRewriter.copyUsageMetricsSummary"
56
57
  ],
57
58
  "main": "./out/extension.js",
58
59
  "contributes": {
@@ -97,22 +98,22 @@
97
98
  },
98
99
  {
99
100
  "command": "promptRewriter.expandCurrentInput",
100
- "title": "Expand Current Input",
101
+ "title": "Specify Current Input",
101
102
  "category": "Prompt Rewriter"
102
103
  },
103
104
  {
104
105
  "command": "promptRewriter.expandJsonCurrentInput",
105
- "title": "Expand Current Input (JSON)",
106
+ "title": "Specify Current Input (JSON)",
106
107
  "category": "Prompt Rewriter"
107
108
  },
108
109
  {
109
110
  "command": "promptRewriter.expandLoopCurrentInput",
110
- "title": "Expand Current Input (Loop)",
111
+ "title": "Research Current Input (Spec)",
111
112
  "category": "Prompt Rewriter"
112
113
  },
113
114
  {
114
115
  "command": "promptRewriter.expandLoopJsonCurrentInput",
115
- "title": "Expand Current Input (Loop JSON)",
116
+ "title": "Research Current Input (Prompt)",
116
117
  "category": "Prompt Rewriter"
117
118
  },
118
119
  {
@@ -139,6 +140,11 @@
139
140
  "command": "promptRewriter.importHermesSettings",
140
141
  "title": "Import Hermes Model Settings",
141
142
  "category": "Prompt Rewriter"
143
+ },
144
+ {
145
+ "command": "promptRewriter.copyUsageMetricsSummary",
146
+ "title": "Copy Usage Metrics Summary",
147
+ "category": "Prompt Rewriter"
142
148
  }
143
149
  ],
144
150
  "keybindings": [
@@ -283,7 +289,7 @@
283
289
  "promptRewriter.anthropicWorkspaceId": {
284
290
  "type": "string",
285
291
  "default": "",
286
- "description": "Anthropic workspace ID (wrkspc_…) required for identity-linked / multi-workspace API keys. Sent as the anthropic-workspace-id header."
292
+ "description": "Anthropic workspace ID (wrkspc_\u2026) required for identity-linked / multi-workspace API keys. Sent as the anthropic-workspace-id header."
287
293
  },
288
294
  "promptRewriter.googleApiKey": {
289
295
  "type": "string",
@@ -322,6 +328,13 @@
322
328
  "maximum": 600000,
323
329
  "description": "Timeout in milliseconds for Ollama requests used by current-input and clipboard commands. Default: 180000 (3 minutes)."
324
330
  },
331
+ "promptRewriter.ollamaNumCtx": {
332
+ "type": "number",
333
+ "default": 8192,
334
+ "minimum": 2048,
335
+ "maximum": 131072,
336
+ "description": "Context window size sent to Ollama as options.num_ctx for every Ollama command (F6\u2013F12, clipboard, selection). Default: 8192. Raise it if local models truncate long prompts."
337
+ },
325
338
  "promptRewriter.contextFolder": {
326
339
  "type": "string",
327
340
  "default": ".cursor/rules",
@@ -330,12 +343,12 @@
330
343
  "promptRewriter.includeRootDocs": {
331
344
  "type": "boolean",
332
345
  "default": true,
333
- "description": "When true, current-input transforms load AGENTS.md, README.md, and .cursorrules when present. F8/F12 include them only within their bounded lean context."
346
+ "description": "When true, current-input transforms load AGENTS.md, README.md, and .cursorrules when present. F6/F7 Research and F8/F12 include them only within their bounded lean context."
334
347
  },
335
348
  "promptRewriter.includeGlobalCursorRules": {
336
349
  "type": "boolean",
337
350
  "default": true,
338
- "description": "When true, F6/F7/F9/F10 load Cursor global/user rules from ~/.cursor/rules. F8/F12 always skip global rules."
351
+ "description": "When true, F9/F10 load Cursor global/user rules from ~/.cursor/rules. F6/F7 Research and F8/F12 always skip global rules."
339
352
  },
340
353
  "promptRewriter.disabledGlobalCursorRuleFiles": {
341
354
  "type": "array",
@@ -356,47 +369,81 @@
356
369
  "promptRewriter.docsFolder": {
357
370
  "type": "string",
358
371
  "default": "docs",
359
- "description": "Workspace-relative docs folder loaded by F6/F7/F9/F10 (.md/.mdc/.txt). Set empty to disable. F8/F12 always skip it."
372
+ "description": "Workspace-relative docs folder loaded by F9/F10 (.md/.mdc/.txt). Set empty to disable. F6/F7 Research and F8/F12 always skip it (F6/F7 still load related doc sections through research evidence)."
360
373
  },
361
374
  "promptRewriter.includeArchitectureDefaults": {
362
375
  "type": "boolean",
363
376
  "default": true,
364
- "description": "When true, F6-F12 include built-in SOLID and hexagonal architecture constraints for software tasks."
377
+ "description": "When true, F8 and F12 include built-in SOLID and hexagonal architecture constraints for software tasks. F6/F7 Research and F9/F10 Specify skip them."
365
378
  },
366
379
  "promptRewriter.includeLastChatResponse": {
367
380
  "type": "boolean",
368
381
  "default": true,
369
- "description": "When true, Expand Current Input (F6/F7/F9/F10) include chat history from Cursor agent transcripts: the current conversation (user + assistant turns) plus older project transcripts when the character budget allows. F8 Rewrite always skips chat history. F12 Suggest Next always loads it."
382
+ "description": "Chat history from Cursor agent transcripts. F6/F7 Research and F9/F10 Specify always skip chat history. F8 Rewrite always skips chat history. F12 Suggest Next always loads it."
383
+ },
384
+ "promptRewriter.rewriteProjectAnalysis": {
385
+ "type": "boolean",
386
+ "default": true,
387
+ "description": "F8 analyzes the request before rewriting it: it indexes the project docs (workspace rules, README/AGENTS/CLAUDE, the extension manifest, specs/, the docs folder, CHANGELOG), asks the model which sections the input concerns, and rewrites with those sections in full instead of the first part of the root docs. Adds one model call (shared with the expert research subject detection)."
388
+ },
389
+ "promptRewriter.rewriteExpertResearch": {
390
+ "type": "boolean",
391
+ "default": true,
392
+ "description": "When true, Rewrite Current Input (F8) detects the subject of the request (also using the last chat reply), searches the web with the backend's native search (OpenAI, Anthropic or Gemini) for how an expert in that subject approaches the task and which tools they use, and writes the method note to the Prompt Rewriter Output log (not the chat field). Only tools present in the workspace are listed. Only the detected subject is sent to the search, never the prompt text. Skipped when the backend has no web search."
370
393
  },
371
394
  "promptRewriter.rewriteSystemPromptRules": {
372
395
  "type": "string",
373
396
  "default": "",
374
397
  "editPresentation": "multilineText",
375
- "description": "Custom system prompt for Rewrite Current Input (F8). When empty, the built-in strict rewrite rules are used (no inference, no gap-filling, preserve ambiguity) and always prefix a context-grounded expert agent persona. Editable from the Rules tab."
398
+ "description": "Custom system prompt for Rewrite Current Input (F8). When empty, the built-in rules write the six-part clarified request (system context, what it does, actor, use cases, domain rules, limits) with no persona line. Editable from the Rules tab."
376
399
  },
377
400
  "promptRewriter.expandSystemPromptRules": {
378
401
  "type": "string",
379
402
  "default": "",
380
403
  "editPresentation": "multilineText",
381
- "description": "Custom system prompt for Expand Current Input (F9). When empty, the built-in Grill-with-Docs expand rules are used, including a context-grounded Act as a … expert role line. Editable from the Rules tab."
404
+ "description": "Custom system prompt for Specify Current Input (F9). When empty, the built-in rules write the eight-part feature specification without running F8 and without a persona line. Editable from the Rules tab."
382
405
  },
383
406
  "promptRewriter.expandJsonSystemPromptRules": {
384
407
  "type": "string",
385
408
  "default": "",
386
409
  "editPresentation": "multilineText",
387
- "description": "Custom system prompt for Expand Current Input (JSON) (F10). When empty, the built-in JSON expand rules are used, including a required expert_role (Act as a …). Editable from the Rules tab."
410
+ "description": "Custom system prompt for Specify Current Input (JSON) (F10). When empty, the built-in JSON rules write the same eight parts as F9 with no expert_role field. Editable from the Rules tab."
411
+ },
412
+ "promptRewriter.researchSpecSystemPromptRules": {
413
+ "type": "string",
414
+ "default": "",
415
+ "editPresentation": "multilineText",
416
+ "description": "Custom system prompt for Research Current Input (Spec) (F7). When empty, the built-in rules write the eight-part specification plus the research record, with no persona line. Editable from the Rules tab."
417
+ },
418
+ "promptRewriter.researchPromptSystemPromptRules": {
419
+ "type": "string",
420
+ "default": "",
421
+ "editPresentation": "multilineText",
422
+ "description": "Custom system prompt for Research Current Input (Prompt) (F6). When empty, the built-in rules write the six F8 parts plus the research record, with no persona line. Editable from the Rules tab."
388
423
  },
389
424
  "promptRewriter.loopSystemPromptRules": {
390
425
  "type": "string",
391
426
  "default": "",
392
427
  "editPresentation": "multilineText",
393
- "description": "Custom system prompt for Expand Current Input (Loop) (F7). When empty, the built-in Grill-with-Docs loop rules are used, including a context-grounded Act as a … expert role line. Editable from the Rules tab."
428
+ "description": "Deprecated and ignored. F7 no longer writes a Spec Kit plan; use promptRewriter.researchSpecSystemPromptRules.",
429
+ "deprecationMessage": "Ignored since 0.16.0: F7 is now Research Current Input (Spec). Use promptRewriter.researchSpecSystemPromptRules."
394
430
  },
395
431
  "promptRewriter.loopJsonSystemPromptRules": {
396
432
  "type": "string",
397
433
  "default": "",
398
434
  "editPresentation": "multilineText",
399
- "description": "Custom system prompt for Expand Current Input (Loop JSON) (F6). When empty, the built-in JSON loop rules are used, including a required expert_role (Act as a …). Editable from the Rules tab."
435
+ "description": "Deprecated and ignored. F6 no longer writes a Spec Kit plan as JSON; use promptRewriter.researchPromptSystemPromptRules.",
436
+ "deprecationMessage": "Ignored since 0.16.0: F6 is now Research Current Input (Prompt). Use promptRewriter.researchPromptSystemPromptRules."
437
+ },
438
+ "promptRewriter.shareUsageMetrics": {
439
+ "type": "boolean",
440
+ "default": false,
441
+ "description": "When true, record anonymous usage metrics (command id, success/failure, extension version, platform, LLM backend). Never records prompt text, API keys, or personal data. See docs/usage-metrics.md."
442
+ },
443
+ "promptRewriter.usageMetricsEndpoint": {
444
+ "type": "string",
445
+ "default": "",
446
+ "description": "Optional HTTPS URL to POST anonymous usage event batches when shareUsageMetrics is enabled. Empty keeps metrics local only."
400
447
  }
401
448
  }
402
449
  }
@@ -409,7 +456,11 @@
409
456
  "typecheck": "tsc --noEmit -p ./",
410
457
  "check:version": "node scripts/check-version-sync.mjs",
411
458
  "check:changelog": "node scripts/check-changelog-has-version.mjs",
412
- "test": "npm run check:version && vitest run",
459
+ "check:inventory": "node scripts/check-spec-inventory.mjs",
460
+ "diagram": "node scripts/architecture-diagram.mjs --write",
461
+ "check:architecture": "node scripts/architecture-diagram.mjs --check",
462
+ "test:acceptance": "vitest run --config tests/acceptance/vitest.config.ts",
463
+ "test": "npm run check:version && npm run check:inventory && npm run check:architecture && vitest run && npm run test:acceptance",
413
464
  "preversion": "npm run check:version && npm run typecheck && npm run test",
414
465
  "version": "npm run check:changelog",
415
466
  "postversion": "npm run package",
@@ -417,7 +468,8 @@
417
468
  "release:minor": "npm version minor -m \"chore(release): %s\"",
418
469
  "release:major": "npm version major -m \"chore(release): %s\"",
419
470
  "package": "node scripts/package-vsix.mjs",
420
- "publish:npm": "npm run package && npm publish --access public --tag rc"
471
+ "publish:npm": "npm run package && npm publish --access public --tag rc",
472
+ "publish:npm:stable": "npm run check:changelog && npm run package && npm publish --access public"
421
473
  },
422
474
  "devDependencies": {
423
475
  "@eslint/js": "^9.34.0",