pi-usereq 0.39.0 → 0.40.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.
@@ -3336,7 +3336,7 @@ import type { PromptCommandExecutionPlan } from "./prompt-command-runtime.js";
3336
3336
 
3337
3337
  ---
3338
3338
 
3339
- # prompts.ts | TypeScript | 357L | 10 symbols | 7 imports | 19 comments
3339
+ # prompts.ts | TypeScript | 425L | 11 symbols | 8 imports | 21 comments
3340
3340
  > Path: `src/core/prompts.ts`
3341
3341
  - @brief Renders bundled pi-usereq prompts for the current project context.
3342
3342
  - @details Applies placeholder substitution, legacy tool-name rewrites, and conditional pi.dev governance guidance before prompt text is sent to the agent. Runtime is linear in prompt size plus replacement count. Side effects are limited to filesystem reads used for manifest checks and bundled prompt loading.
@@ -3345,7 +3345,8 @@ import type { PromptCommandExecutionPlan } from "./prompt-command-runtime.js";
3345
3345
  ```
3346
3346
  import fs from "node:fs";
3347
3347
  import path from "node:path";
3348
- import { buildPromptReplacementPaths, DEFAULT_DOCS_DIR, type UseReqConfig } from "./config.js";
3348
+ import {
3349
+ import {
3349
3350
  import { formatRuntimePathForDisplay, normalizeRelativeDirContract } from "./path-context.js";
3350
3351
  import type {
3351
3352
  import { getPromptRequiredDocs } from "./prompt-command-runtime.js";
@@ -3354,7 +3355,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3354
3355
 
3355
3356
  ## Definitions
3356
3357
 
3357
- ### fn `function buildPiDevConformanceBlock(promptName: string, projectBase: string): string` (L109-118)
3358
+ ### fn `function buildPiDevConformanceBlock(promptName: string, projectBase: string): string` (L119-128)
3358
3359
  - @brief Builds the conditional pi.dev governance block for one rendered prompt.
3359
3360
  - @details Emits the manifest-driven governance rules only when the selected bundled prompt can analyze or mutate source code and the project root contains the pi.dev manifest. Time complexity O(1). No filesystem writes.
3360
3361
  - @param[in] promptName {string} Bundled prompt identifier.
@@ -3362,7 +3363,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3362
3363
  - @return {string} Markdown bullet block or the empty string when injection is not applicable.
3363
3364
  - @satisfies REQ-032, REQ-033, REQ-034, REQ-108, REQ-273, REQ-274, REQ-275
3364
3365
 
3365
- ### fn `function injectPiDevConformanceBlock(text: string, promptName: string, projectBase: string): string` (L129-136)
3366
+ ### fn `function injectPiDevConformanceBlock(text: string, promptName: string, projectBase: string): string` (L139-146)
3366
3367
  - @brief Injects the pi.dev governance block into the prompt behavior section.
3367
3368
  - @details Inserts the block immediately after the `## Behavior` heading so downstream agents evaluate the rule before workflow steps. Leaves prompts unchanged when no behavior section exists or the block is already present. Time complexity O(n).
3368
3369
  - @param[in] text {string} Prompt markdown after placeholder replacement.
@@ -3371,7 +3372,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3371
3372
  - @return {string} Prompt markdown with zero or one injected conformance block.
3372
3373
  - @satisfies REQ-032, REQ-033, REQ-034, REQ-108, REQ-273, REQ-274, REQ-275
3373
3374
 
3374
- ### fn `function buildContextFilesBlock(projectBase: string, config: UseReqConfig): string` (L157-174)
3375
+ ### fn `function buildContextFilesBlock(projectBase: string, config: UseReqConfig): string` (L167-184)
3375
3376
  - @brief Builds the markdown block that replaces the `%%CONTEXT_FILES%%` prompt token.
3376
3377
  - @details Iterates the documented `REQUIREMENTS.md`, `REFERENCES.md`, `WORKFLOW.md` order, skips disabled flags and missing files without error, and renders each remaining file as a file-name heading, an HTML `<file name="<docs-dir>/<filename>">` reference with `%%DOC_PATH%%` pre-substituted, and the raw file content inside four-backtick `markdown` fences. Runtime is O(n) in aggregate context-file size. Side effects are limited to filesystem reads.
3377
3378
  - @param[in] projectBase {string} Absolute project root used to resolve the configured docs directory.
@@ -3379,14 +3380,14 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3379
3380
  - @return {string} Rendered markdown block, or the empty string when no enabled context file exists.
3380
3381
  - @satisfies REQ-329, REQ-330, REQ-331, REQ-332
3381
3382
 
3382
- ### fn `export function adaptPromptForInternalTools(text: string): string` (L183-189)
3383
+ ### fn `export function adaptPromptForInternalTools(text: string): string` (L193-199)
3383
3384
  - @brief Rewrites bundled prompt tool references from legacy `req --...` syntax to internal tool names.
3384
3385
  - @details Applies deterministic global regex replacements so prompt text matches the extension-registered tool surface instead of the standalone CLI spelling. Time complexity O(p*r) where p is pattern count and r is prompt length.
3385
3386
  - @param[in] text {string} Prompt markdown before tool-reference normalization.
3386
3387
  - @return {string} Prompt markdown with internal tool names.
3387
3388
  - @satisfies REQ-003
3388
3389
 
3389
- ### fn `export function applyReplacements(text: string, replacements: Record<string, string>): string` (L199-205)
3390
+ ### fn `export function applyReplacements(text: string, replacements: Record<string, string>): string` (L209-215)
3390
3391
  - @brief Applies literal placeholder replacements to bundled prompt markdown.
3391
3392
  - @details Replaces every placeholder token using split/join semantics so all occurrences are updated without regex escaping. Time complexity O(t*n) where t is replacement count and n is prompt length.
3392
3393
  - @param[in] text {string} Prompt markdown containing placeholder tokens.
@@ -3394,7 +3395,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3394
3395
  - @return {string} Prompt markdown with all placeholder tokens expanded.
3395
3396
  - @satisfies REQ-002
3396
3397
 
3397
- ### fn `function buildPromptExecutionBlock(` (L215-237)
3398
+ ### fn `function buildPromptExecutionBlock(` (L225-247)
3398
3399
  - @brief Builds the prompt-command execution block injected at prompt start.
3399
3400
  - @details Serializes the already-completed repository validation, prompt-specific required-doc validation, worktree routing decision, and extension-owned lifecycle responsibilities so downstream agents do not repeat command-side orchestration. Time complexity is O(d) in required-doc count. No external state is mutated.
3400
3401
  - @param[in] promptName {PromptCommandName} Bundled prompt identifier.
@@ -3402,7 +3403,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3402
3403
  - @return {string} Markdown block or the empty string when runtime execution metadata is unavailable.
3403
3404
  - @satisfies REQ-200, REQ-201, REQ-202, REQ-206, REQ-207, REQ-208, REQ-209
3404
3405
 
3405
- ### fn `function injectPromptExecutionBlock(` (L247-258)
3406
+ ### fn `function injectPromptExecutionBlock(` (L257-268)
3406
3407
  - @brief Injects the prompt-command execution block near the start of the rendered prompt.
3407
3408
  - @details Inserts the execution block immediately after the first level-1 heading so downstream agents evaluate extension-owned orchestration before workflow steps. Leaves prompts unchanged when no execution block is provided or when the block is already present. Time complexity O(n).
3408
3409
  - @param[in] text {string} Prompt markdown after placeholder replacement.
@@ -3410,7 +3411,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3410
3411
  - @param[in] executionPlan {PromptCommandExecutionPlan | undefined} Prepared execution plan.
3411
3412
  - @return {string} Prompt markdown with zero or one injected execution block.
3412
3413
 
3413
- ### fn `function buildPromptReplacements(` (L270-282)
3414
+ ### fn `function buildPromptReplacements(` (L280-292)
3414
3415
  - @brief Builds prompt-specific runtime placeholder replacements.
3415
3416
  - @details Merges shared path substitutions with prompt-scoped runtime values for `%%ARGS%%` and `%%PROMPT%%`. Time complexity is O(g log g + s) due to delegated path replacement building, where g is guideline count and s is source-directory count. Side effects are limited to filesystem reads delegated to shared path-context helpers.
3416
3417
  - @param[in] promptName {string} Bundled prompt identifier without the `req-` prefix.
@@ -3420,7 +3421,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3420
3421
  - @return {Record<string, string>} Prompt-specific placeholder-to-value map.
3421
3422
  - @satisfies REQ-002, REQ-211
3422
3423
 
3423
- ### fn `function renderBundledCommitInstruction(` (L294-308)
3424
+ ### fn `function renderBundledCommitInstruction(` (L304-318)
3424
3425
  - @brief Renders the bundled git instruction injected through `%%COMMIT%%`.
3425
3426
  - @details Selects `resources/instructions/git_commit.md` when automatic git commit is enabled and `resources/instructions/git_read-only.md` otherwise, then applies the same runtime placeholder substitutions used by bundled prompts before returning the rendered markdown. Time complexity is O(n + g log g + s) where n is instruction size, g is guideline count, and s is source-directory count. Side effects are limited to filesystem reads.
3426
3427
  - @param[in] promptName {string} Bundled prompt identifier without the `req-` prefix.
@@ -3430,7 +3431,7 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3430
3431
  - @return {string} Rendered bundled git instruction selected for the current automatic-commit mode.
3431
3432
  - @satisfies REQ-211, REQ-213, REQ-214
3432
3433
 
3433
- ### fn `export function renderPrompt(` (L321-357)
3434
+ ### fn `export function renderPrompt(` (L331-367)
3434
3435
  - @brief Renders a bundled prompt for the current project context.
3435
3436
  - @details Loads the bundled markdown template, expands configuration-derived placeholders, injects extension-owned execution guidance plus conditional pi.dev governance guidance, expands the optional bundled commit instruction, and rewrites legacy tool references to internal names. Time complexity O(n) relative to prompt size plus delegated commit-instruction rendering. No tracked files are modified.
3436
3437
  - @param[in] promptName {string} Bundled prompt identifier.
@@ -3441,19 +3442,29 @@ import { readBundledInstruction, readBundledPrompt } from "./resources.js";
3441
3442
  - @return {string} Fully rendered prompt markdown ready for `pi.sendUserMessage(...)`.
3442
3443
  - @satisfies REQ-002, REQ-003, REQ-032, REQ-033, REQ-034, REQ-108, REQ-200, REQ-201, REQ-202, REQ-206, REQ-207, REQ-208, REQ-209, REQ-211, REQ-213, REQ-214, REQ-273, REQ-274, REQ-275, REQ-329, REQ-330, REQ-331, REQ-332
3443
3444
 
3445
+ ### fn `export function renderPromptCommandSummary(` (L385-425)
3446
+ - @brief Builds the on-screen command invocation summary for one bundled prompt-backed `req-<prompt>` command.
3447
+ - @details Renders the command name without the `req-` prefix in uppercase, the user request arguments, and the active configuration fields (`docs-dir`, `src-dir`, `tests-dir`, enabled context files, `AUTO_GIT_COMMIT`, effective `GIT_WORKTREE_ENABLED`, `GIT_WORKTREE_PREFIX`, enabled static-check languages, and `enabled-tools`) so the TUI shows only a compact summary while the full rendered prompt is delivered hidden to the LLM agent. Static-check languages are emitted in canonical `DEFAULT_STATIC_CHECK_LANGUAGES` order; enabled tools are emitted in documented menu order via `comparePiUsereqStartupToolNames`. Runtime is O(l + t log t) where l is language count and t is enabled-tool count. No external state is mutated.
3448
+ - @param[in] promptName {string} Bundled prompt name without the `req-` prefix.
3449
+ - @param[in] args {string} User request arguments passed to the slash command.
3450
+ - @param[in] config {UseReqConfig} Effective project configuration supplying directory, git, static-check, and tool fields.
3451
+ - @return {string} Multi-line command invocation summary text.
3452
+ - @satisfies REQ-335, REQ-336, REQ-337
3453
+
3444
3454
  ## Symbol Index
3445
3455
  |Symbol|Kind|Vis|Lines|Sig|
3446
3456
  |---|---|---|---|---|
3447
- |`buildPiDevConformanceBlock`|fn||109-118|function buildPiDevConformanceBlock(promptName: string, p...|
3448
- |`injectPiDevConformanceBlock`|fn||129-136|function injectPiDevConformanceBlock(text: string, prompt...|
3449
- |`buildContextFilesBlock`|fn||157-174|function buildContextFilesBlock(projectBase: string, conf...|
3450
- |`adaptPromptForInternalTools`|fn||183-189|export function adaptPromptForInternalTools(text: string)...|
3451
- |`applyReplacements`|fn||199-205|export function applyReplacements(text: string, replaceme...|
3452
- |`buildPromptExecutionBlock`|fn||215-237|function buildPromptExecutionBlock(|
3453
- |`injectPromptExecutionBlock`|fn||247-258|function injectPromptExecutionBlock(|
3454
- |`buildPromptReplacements`|fn||270-282|function buildPromptReplacements(|
3455
- |`renderBundledCommitInstruction`|fn||294-308|function renderBundledCommitInstruction(|
3456
- |`renderPrompt`|fn||321-357|export function renderPrompt(|
3457
+ |`buildPiDevConformanceBlock`|fn||119-128|function buildPiDevConformanceBlock(promptName: string, p...|
3458
+ |`injectPiDevConformanceBlock`|fn||139-146|function injectPiDevConformanceBlock(text: string, prompt...|
3459
+ |`buildContextFilesBlock`|fn||167-184|function buildContextFilesBlock(projectBase: string, conf...|
3460
+ |`adaptPromptForInternalTools`|fn||193-199|export function adaptPromptForInternalTools(text: string)...|
3461
+ |`applyReplacements`|fn||209-215|export function applyReplacements(text: string, replaceme...|
3462
+ |`buildPromptExecutionBlock`|fn||225-247|function buildPromptExecutionBlock(|
3463
+ |`injectPromptExecutionBlock`|fn||257-268|function injectPromptExecutionBlock(|
3464
+ |`buildPromptReplacements`|fn||280-292|function buildPromptReplacements(|
3465
+ |`renderBundledCommitInstruction`|fn||304-318|function renderBundledCommitInstruction(|
3466
+ |`renderPrompt`|fn||331-367|export function renderPrompt(|
3467
+ |`renderPromptCommandSummary`|fn||385-425|export function renderPromptCommandSummary(|
3457
3468
 
3458
3469
 
3459
3470
  ---
@@ -4741,7 +4752,7 @@ import path from "node:path";
4741
4752
 
4742
4753
  ---
4743
4754
 
4744
- # index.ts | TypeScript | 4541L | 106 symbols | 27 imports | 110 comments
4755
+ # index.ts | TypeScript | 4582L | 106 symbols | 27 imports | 110 comments
4745
4756
  > Path: `src/index.ts`
4746
4757
  - @brief Registers the pi-usereq extension commands, tools, and configuration UI.
4747
4758
  - @details Bridges the standalone tool-runner layer into the pi extension API by registering prompt commands, agent tools, and interactive configuration menus. Runtime at module load is O(1); later behavior depends on the selected command or tool. Side effects include extension registration, UI updates, filesystem reads/writes, and delegated tool execution.
@@ -4760,7 +4771,7 @@ import {
4760
4771
  import {
4761
4772
  import { showPiUsereqSettingsMenu, type PiUsereqSettingsMenuChoice } from "./core/settings-menu.js";
4762
4773
  import {
4763
- import { renderPrompt } from "./core/prompts.js";
4774
+ import {
4764
4775
  import {
4765
4776
  import {
4766
4777
  import {
@@ -4779,55 +4790,55 @@ import { makeRelativeIfContainsProject, shellSplit } from "./core/utils.js";
4779
4790
 
4780
4791
  ## Definitions
4781
4792
 
4782
- ### iface `interface PiShortcutRegistrar` (L182-190)
4793
+ ### iface `interface PiShortcutRegistrar` (L186-194)
4783
4794
  - @brief Describes the optional shortcut-registration surface used by pi-usereq.
4784
4795
  - @details Narrows the runtime API to the documented `registerShortcut(...)`
4785
4796
  method so the extension can remain compatible with offline harnesses that do
4786
4797
  not implement shortcut capture. Compile-time only and introduces no runtime
4787
4798
  cost.
4788
4799
 
4789
- ### fn `function getProjectBase(cwd: string): string` (L198-207)
4800
+ ### fn `function getProjectBase(cwd: string): string` (L202-211)
4790
4801
  - @brief Resolves the effective project base from a working directory.
4791
4802
  - @details Normalizes the provided cwd into an absolute path without consulting configuration. Time complexity is O(1). No I/O side effects occur.
4792
4803
  - @param[in] cwd {string} Current working directory.
4793
4804
  - @return {string} Absolute project base path.
4794
4805
 
4795
- ### fn `function getProcessCwdSafe(): string` (L214-223)
4806
+ ### fn `function getProcessCwdSafe(): string` (L218-227)
4796
4807
  - @brief Resolves a safe process working directory for extension-load paths.
4797
4808
  - @details Returns `process.cwd()` when available and falls back to absolute `PWD`, `HOME`, or `/` when the current shell directory has been deleted. Runtime is O(1). No external state is mutated.
4798
4809
  - @return {string} Absolute fallback-safe process working directory.
4799
4810
 
4800
- ### fn `function resolveLiveBootstrapCwd(cwd: string): string` (L231-243)
4811
+ ### fn `function resolveLiveBootstrapCwd(cwd: string): string` (L235-247)
4801
4812
  - @brief Resolves the live working directory used for bootstrap-sensitive flows.
4802
4813
  - @details Prefers the supplied cwd when it still exists. Otherwise reuses the tracked runtime context path when it remains live, then the tracked runtime base path, and finally a process-safe cwd so deleted worktree paths retained by stale contexts cannot poison later prompt preflight or lifecycle bootstrap. Runtime is O(1) plus bounded filesystem probes. No external state is mutated.
4803
4814
  - @param[in] cwd {string} Candidate context cwd.
4804
4815
  - @return {string} Existing absolute cwd used for bootstrap work.
4805
4816
 
4806
- ### fn `function syncContextCwdMirror(ctx: { cwd?: string }, cwd: string): void` (L252-261)
4817
+ ### fn `function syncContextCwdMirror(ctx: { cwd?: string }, cwd: string): void` (L256-265)
4807
4818
  - @brief Best-effort synchronizes one context `cwd` mirror with bootstrap reality.
4808
4819
  - @details Applies the resolved live cwd to the supplied context when writable and ignores stale or read-only mirrors so command bootstrap can continue using authoritative filesystem probes. Runtime is O(1). Side effects are limited to optional `ctx.cwd` mutation.
4809
4820
  - @param[in] cwd {string} Resolved live cwd.
4810
4821
  - @param[in,out] ctx {{ cwd?: string }} Mutable context-like object.
4811
4822
  - @return {void} No return value.
4812
4823
 
4813
- ### fn `function loadProjectConfig(cwd: string): UseReqConfig` (L270-273)
4824
+ ### fn `function loadProjectConfig(cwd: string): UseReqConfig` (L274-277)
4814
4825
  - @brief Loads project configuration for the extension runtime.
4815
4826
  - @details Resolves the project base, loads persisted config, and normalizes configured directory paths without reading or persisting runtime-derived `base-path` or `git-path` metadata. Runtime is dominated by config I/O. Side effects are limited to filesystem reads.
4816
4827
  - @param[in] cwd {string} Current working directory.
4817
4828
  - @return {UseReqConfig} Effective project configuration.
4818
4829
  - @satisfies REQ-030, REQ-145, REQ-146
4819
4830
 
4820
- - type `type DebugToolCommandExecuteResult = ReturnType<typeof buildMonolithicToolExecuteResult>;` (L279)
4831
+ - type `type DebugToolCommandExecuteResult = ReturnType<typeof buildMonolithicToolExecuteResult>;` (L283)
4821
4832
  - @brief Describes the execute-result surface reused by debug tool wrapper commands.
4822
4833
  - @details Narrows debug slash-command handlers to the same monolithic content-plus-execution wrapper returned by agent tools so editor output and notifications can reuse shared extraction helpers. The alias is compile-time only and introduces no runtime cost.
4823
- ### fn `function shouldRegisterDebugToolCommands(cwd: string): boolean` (L288-294)
4834
+ ### fn `function shouldRegisterDebugToolCommands(cwd: string): boolean` (L292-298)
4824
4835
  - @brief Tests whether debug tool wrapper commands should be registered for one runtime cwd.
4825
4836
  - @details Loads the effective project configuration for the supplied cwd and returns `true` only when `DEBUG_TOOL_COMMANDS_ENABLED` resolves to `enable`. Malformed or unreadable config payloads degrade to `false` so extension activation never aborts while deciding whether to register optional debug commands. Runtime is dominated by config I/O. Side effects are limited to filesystem reads.
4826
4837
  - @param[in] cwd {string} Candidate runtime working directory.
4827
4838
  - @return {boolean} `true` when debug tool wrapper commands should be registered.
4828
4839
  - @satisfies REQ-323
4829
4840
 
4830
- ### fn `function writeDebugToolCommandResultToEditor(` (L305-319)
4841
+ ### fn `function writeDebugToolCommandResultToEditor(` (L309-323)
4831
4842
  - @brief Writes one debug tool-wrapper result into the editor and emits a status notification.
4832
4843
  - @details Extracts the primary monolithic content text from the wrapped tool result, forwards that exact text to the editor, and emits an informational or error notification keyed by the tool exit code. Runtime is O(n) in output length. Side effects include editor-text mutation and UI notifications.
4833
4844
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4836,7 +4847,7 @@ cost.
4836
4847
  - @return {void} No return value.
4837
4848
  - @satisfies REQ-324
4838
4849
 
4839
- ### fn `function executeDebugToolCommand(` (L331-349)
4850
+ ### fn `function executeDebugToolCommand(` (L335-353)
4840
4851
  - @brief Executes one config-gated debug tool wrapper slash command.
4841
4852
  - @details Resolves a live cwd for the invoking command context, refreshes runtime path state, loads the effective project configuration, rejects execution when debug tool wrapper commands are disabled, and otherwise writes the selected wrapped tool output into the editor. Runtime is dominated by the delegated tool runner. Side effects include runtime-path bootstrap, filesystem reads, optional tool side effects, editor-text mutation, and UI notifications.
4842
4853
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4846,14 +4857,14 @@ cost.
4846
4857
  - @throws {ReqError} Throws when debug tool wrapper commands are disabled for the active project.
4847
4858
  - @satisfies REQ-324, REQ-325
4848
4859
 
4849
- ### fn `function registerDebugToolCommands(pi: ExtensionAPI): void` (L358-397)
4860
+ ### fn `function registerDebugToolCommands(pi: ExtensionAPI): void` (L362-401)
4850
4861
  - @brief Registers config-gated debug slash-command wrappers for selected project analysis tools.
4851
4862
  - @details Registers `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` as extension commands that reuse the same runner paths as the corresponding agent tools and write the resulting monolithic text into the editor instead of the LLM content channel. Re-registering the same commands is idempotent because pi keeps the latest same-extension command definition per name. Runtime is O(1) for registration; handler cost depends on the selected runner. Side effects include command registration.
4852
4863
  - @param[in] pi {ExtensionAPI} Active extension API instance.
4853
4864
  - @return {void} No return value.
4854
4865
  - @satisfies DES-015, REQ-323, REQ-324, REQ-325
4855
4866
 
4856
- ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L407-410)
4867
+ ### fn `function saveProjectConfig(cwd: string, config: UseReqConfig): void` (L411-414)
4857
4868
  - @brief Persists effective project configuration from the extension runtime.
4858
4869
  - @details Resolves the project base, normalizes configured local directory paths into project-relative form, and delegates split local/global persistence to `saveConfig` without serializing runtime-derived path metadata. Runtime is O(n) in config size. Side effects include config-file writes.
4859
4870
  - @param[in] cwd {string} Current working directory.
@@ -4861,38 +4872,38 @@ cost.
4861
4872
  - @return {void} No return value.
4862
4873
  - @satisfies REQ-146, REQ-315
4863
4874
 
4864
- ### fn `function formatLocalConfigPathForMenu(cwd: string): string` (L419-423)
4875
+ ### fn `function formatLocalConfigPathForMenu(cwd: string): string` (L423-427)
4865
4876
  - @brief Formats the current local config path for top-level menu display.
4866
4877
  - @details Resolves `<base-path>/.pi-usereq.json` from the cwd-derived project base and reuses the shared runtime-path formatter so the `Show local configuration` row uses the documented `~`-relative display contract. Runtime is O(p) in path length. No external state is mutated.
4867
4878
  - @param[in] cwd {string} Current working directory.
4868
4879
  - @return {string} `~`-relative or absolute local config-path display value.
4869
4880
  - @satisfies REQ-162
4870
4881
 
4871
- ### fn `function formatGlobalConfigPathForMenu(): string` (L431-433)
4882
+ ### fn `function formatGlobalConfigPathForMenu(): string` (L435-437)
4872
4883
  - @brief Formats the current global config path for top-level menu display.
4873
4884
  - @details Resolves `~/.config/pi-usereq/config.json` through the shared runtime-path formatter so the `Show global configuration` row uses the documented `~`-relative display contract. Runtime is O(p) in path length. No external state is mutated.
4874
4885
  - @return {string} `~`-relative or absolute global config-path display value.
4875
4886
  - @satisfies REQ-319
4876
4887
 
4877
- ### fn `function buildTerminalSettingsMenuChoices(options:` (L442-453)
4888
+ ### fn `function buildTerminalSettingsMenuChoices(options:` (L446-457)
4878
4889
  - @brief Builds the standardized terminal rows appended to every configuration menu.
4879
4890
  - @details Returns the canonical value-less `Reset defaults` row so all configuration menus and descendant selector menus share the same terminal ordering contract without rendering `Save and close`. Runtime is O(1). No external state is mutated.
4880
4891
  - @param[in] options {{ resetDefaultsDescription: string }} Menu-specific terminal-row metadata.
4881
4892
  - @return {PiUsereqSettingsMenuChoice[]} Ordered terminal menu rows.
4882
4893
  - @satisfies REQ-193
4883
4894
 
4884
- ### iface `interface ResetConfirmationChange` (L459-463)
4895
+ ### iface `interface ResetConfirmationChange` (L463-467)
4885
4896
  - @brief Describes one pending reset value change shown in confirmation menus.
4886
4897
  - @details Stores the row label plus its previous and next values so reset-confirmation submenus can expose machine-readable and human-verifiable change previews. The interface is compile-time only and introduces no runtime cost.
4887
4898
 
4888
- ### fn `function formatResetConfirmationValue(previousValue: string, nextValue: string): string` (L472-474)
4899
+ ### fn `function formatResetConfirmationValue(previousValue: string, nextValue: string): string` (L476-478)
4889
4900
  - @brief Formats one reset-confirmation value pair for menu display.
4890
4901
  - @details Serializes the previous and next values into a deterministic `previous -> next` preview string used by confirmation submenus. Runtime is O(n) in combined value length. No external state is mutated.
4891
4902
  - @param[in] previousValue {string} Current persisted value.
4892
4903
  - @param[in] nextValue {string} Candidate default value.
4893
4904
  - @return {string} Rendered preview string.
4894
4905
 
4895
- ### fn `function buildResetConfirmationChoices(` (L484-523)
4906
+ ### fn `function buildResetConfirmationChoices(` (L488-527)
4896
4907
  - @brief Builds the shared settings-menu choices for one reset-confirmation submenu.
4897
4908
  - @details Renders each pending changed value as a disabled preview row, appends explicit approve and abort actions, and falls back to one disabled no-op row when no values would change. Runtime is O(n) in changed-value count. No external state is mutated.
4898
4909
  - @param[in] changes {ResetConfirmationChange[]} Changed-value preview rows.
@@ -4900,7 +4911,7 @@ cost.
4900
4911
  - @param[in] abortDescription {string} Description for the abort action.
4901
4912
  - @return {PiUsereqSettingsMenuChoice[]} Reset-confirmation submenu choices.
4902
4913
 
4903
- ### fn `async function confirmResetChanges(` (L535-548)
4914
+ ### fn `async function confirmResetChanges(` (L539-552)
4904
4915
  - @brief Opens one explicit reset-confirmation submenu.
4905
4916
  - @details Uses the shared settings-menu renderer to show every changed value before reset application and returns `true` only when the user selects the explicit approval action. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
4906
4917
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4910,14 +4921,14 @@ cost.
4910
4921
  - @param[in] abortDescription {string} Description for the abort action.
4911
4922
  - @return {Promise<boolean>} `true` when the reset is explicitly approved.
4912
4923
 
4913
- ### fn `function writePersistedConfigToEditor(` (L557-562)
4924
+ ### fn `function writePersistedConfigToEditor(` (L561-566)
4914
4925
  - @brief Writes one already-persisted config file text into the editor.
4915
4926
  - @details Reads the target config file from disk after the caller has saved any pending changes and forwards the exact persisted text into the editor. Runtime is O(n) in serialized config size. Side effects include filesystem reads and editor-text mutation.
4916
4927
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4917
4928
  - @param[in] configPath {string} Absolute persisted config path.
4918
4929
  - @return {void} No return value.
4919
4930
 
4920
- ### fn `function writePersistedLocalConfigToEditor(` (L572-578)
4931
+ ### fn `function writePersistedLocalConfigToEditor(` (L576-582)
4921
4932
  - @brief Writes the already-persisted local configuration file text into the editor.
4922
4933
  - @details Reads `<base-path>/.pi-usereq.json` from disk after the caller has saved any pending local and global configuration changes, then forwards that exact persisted text into the editor. Runtime is O(n) in serialized config size. Side effects include filesystem reads and editor-text mutation.
4923
4934
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -4925,58 +4936,58 @@ cost.
4925
4936
  - @return {void} No return value.
4926
4937
  - @satisfies REQ-031
4927
4938
 
4928
- ### fn `function writePersistedGlobalConfigToEditor(` (L587-591)
4939
+ ### fn `function writePersistedGlobalConfigToEditor(` (L591-595)
4929
4940
  - @brief Writes the already-persisted global configuration file text into the editor.
4930
4941
  - @details Reads `~/.config/pi-usereq/config.json` from disk after the caller has saved any pending local and global configuration changes, then forwards that exact persisted text into the editor. Runtime is O(n) in serialized config size. Side effects include filesystem reads and editor-text mutation.
4931
4942
  - @param[in] ctx {ExtensionCommandContext} Active command context.
4932
4943
  - @return {void} No return value.
4933
4944
  - @satisfies REQ-318
4934
4945
 
4935
- ### fn `function buildSearchToolSupportedTagGuidelines(): string[]` (L652-656)
4946
+ ### fn `function buildSearchToolSupportedTagGuidelines(): string[]` (L656-660)
4936
4947
  - @brief Builds the supported-tag guidance lines embedded in search-tool registrations.
4937
4948
  - @details Emits one deterministic line per supported language containing its canonical registration label and sorted tag list so downstream agents can specialize requests without invoking the tool first. Runtime is O(l * t log t). No side effects occur.
4938
4949
  - @return {string[]} Supported-tag guidance lines.
4939
4950
 
4940
- ### fn `function buildSearchToolSchemaDescription(scope: FindToolScope): string` (L664-669)
4951
+ ### fn `function buildSearchToolSchemaDescription(scope: FindToolScope): string` (L668-673)
4941
4952
  - @brief Builds the schema description for one search-tool registration.
4942
4953
  - @details Specializes the explicit-file and configured-directory input contracts while documenting the monolithic markdown output channel and minimal execution details shape. Runtime is O(1). No side effects occur.
4943
4954
  - @param[in] scope {FindToolScope} Search-tool scope.
4944
4955
  - @return {string} Parameter-schema description.
4945
4956
 
4946
- ### fn `function buildSearchToolPromptGuidelines(scope: FindToolScope): string[]` (L677-690)
4957
+ ### fn `function buildSearchToolPromptGuidelines(scope: FindToolScope): string[]` (L681-694)
4947
4958
  - @brief Builds the prompt-guideline set for one search-tool registration.
4948
4959
  - @details Encodes scope selection, monolithic markdown output semantics, regex semantics, line-number behavior, tag-filter rules, and the full language-to-tag matrix as stable agent-oriented strings. Runtime is O(l * t log t). No side effects occur.
4949
4960
  - @param[in] scope {FindToolScope} Search-tool scope.
4950
4961
  - @return {string[]} Prompt-guideline strings.
4951
4962
 
4952
- - type `type MonolithicToolRenderResult = {` (L696)
4963
+ - type `type MonolithicToolRenderResult = {` (L700)
4953
4964
  - @brief Describes the monolithic tool-result surface consumed by tool-row renderers.
4954
4965
  - @details Narrows execute-result data to the primary text content block plus the minimal `details.execution` metadata returned by monolithic tool wrappers. The alias is compile-time only and introduces no runtime cost.
4955
- ### fn `function getMonolithicToolText(result: MonolithicToolRenderResult): string` (L713-716)
4966
+ ### fn `function getMonolithicToolText(result: MonolithicToolRenderResult): string` (L717-720)
4956
4967
  - @brief Extracts the primary monolithic text block from one tool result.
4957
4968
  - @details Returns the first text content block when present and falls back to an empty string when the tool emitted no LLM-facing content. Runtime is O(1). No external state is mutated.
4958
4969
  - @param[in] result {MonolithicToolRenderResult} Tool result wrapper.
4959
4970
  - @return {string} Primary monolithic content text.
4960
4971
 
4961
- ### fn `function getMonolithicToolErrorText(result: MonolithicToolRenderResult): string | undefined` (L724-734)
4972
+ ### fn `function getMonolithicToolErrorText(result: MonolithicToolRenderResult): string | undefined` (L728-738)
4962
4973
  - @brief Reads the first residual execution error string from one monolithic tool result.
4963
4974
  - @details Prefers the first `stderr_lines` entry when present and otherwise falls back to the first line of `stderr`. Runtime is O(1) plus first-line split cost. No external state is mutated.
4964
4975
  - @param[in] result {MonolithicToolRenderResult} Tool result wrapper.
4965
4976
  - @return {string | undefined} First residual execution error string.
4966
4977
 
4967
- ### fn `function formatCompactToolArgumentValue(value: unknown): string | undefined` (L742-781)
4978
+ ### fn `function formatCompactToolArgumentValue(value: unknown): string | undefined` (L746-785)
4968
4979
  - @brief Formats one scalar or structural tool argument for compact render summaries.
4969
4980
  - @details Truncates long strings, compresses arrays into short previews, and renders plain object arguments as key indexes so collapsed tool rows stay compact while still exposing the essential invocation shape. Runtime is O(n) in preview size. No external state is mutated.
4970
4981
  - @param[in] value {unknown} Candidate tool argument value.
4971
4982
  - @return {string | undefined} Compact preview string or `undefined` when the value carries no useful summary.
4972
4983
 
4973
- ### fn `function buildCompactToolInvocationText(args: Record<string, unknown> | undefined): string` (L789-800)
4984
+ ### fn `function buildCompactToolInvocationText(args: Record<string, unknown> | undefined): string` (L793-804)
4974
4985
  - @brief Builds the compact invocation summary appended to collapsed tool rows.
4975
4986
  - @details Renders only caller-supplied parameters that have stable, non-empty compact previews and joins them in insertion order so agents can infer how the tool was used without expanding the full result. Runtime is O(n) in argument count and preview size. No external state is mutated.
4976
4987
  - @param[in] args {Record<string, unknown> | undefined} Current tool call arguments.
4977
4988
  - @return {string} Compact invocation summary prefixed with one separating space, or the empty string when no useful preview exists.
4978
4989
 
4979
- ### fn `function summarizeStructuredToolResult(` (L810-825)
4990
+ ### fn `function summarizeStructuredToolResult(` (L814-829)
4980
4991
  - @brief Builds the compact default text for one monolithic tool result row.
4981
4992
  - @details Prefers the tool name, compact invocation preview, and success marker for collapsed rows, and falls back to residual execution diagnostics when the tool failed before completing successfully. Runtime is O(n) in compact argument-preview size. No external state is mutated.
4982
4993
  - @param[in] toolName {string} Registered tool name.
@@ -4984,36 +4995,37 @@ cost.
4984
4995
  - @param[in] args {Record<string, unknown> | undefined} Current tool call arguments.
4985
4996
  - @return {string} Compact single-line summary.
4986
4997
 
4987
- ### fn `function buildStructuredToolRenderResult(toolName: string)` (L834-853)
4998
+ ### fn `function buildStructuredToolRenderResult(toolName: string)` (L838-857)
4988
4999
  - @brief Builds a custom `renderResult` implementation for one monolithic tool.
4989
5000
  - @details Reuses a mutable `Text` component when possible, keeps the default collapsed row compact with essential invocation parameters plus result status, and reveals the full monolithic content only when the tool row is expanded. Runtime is O(n) in expanded content length and compact argument-preview size. No external state is mutated.
4990
5001
  - @param[in] toolName {string} Registered tool name.
4991
5002
  - @return {(result: MonolithicToolRenderResult, options: { expanded?: boolean; isPartial?: boolean }, _theme: unknown, context: { args?: Record<string, unknown>; lastComponent?: unknown }) => Text} Custom result renderer.
4992
5003
  - @satisfies REQ-210
4993
5004
 
4994
- ### fn `function executeMonolithicTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L861-867)
5005
+ ### fn `function executeMonolithicTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L865-871)
4995
5006
  - @brief Executes one CLI-style runner for a monolithic agent tool.
4996
5007
  - @details Reuses the standalone tool-runner contract, normalizes thrown failures into `ToolResult`, and wraps the selected stdout or stderr text into the monolithic content channel. Runtime is dominated by the delegated runner. Side effects depend on the selected tool.
4997
5008
  - @param[in] operation {() => ToolResult} Runner callback.
4998
5009
  - @return {ReturnType<typeof buildMonolithicToolExecuteResult>} Monolithic tool execute result.
4999
5010
 
5000
- ### fn `function executeStatusTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L876-905)
5011
+ ### fn `function executeStatusTool(operation: () => ToolResult): ReturnType<typeof buildMonolithicToolExecuteResult>` (L880-909)
5001
5012
  - @brief Executes one CLI-style runner for a status-only agent tool.
5002
5013
  - @details Reuses the standalone tool-runner contract, preserves `content[0].text` as the status-only `success` or `error: <diagnostic>` payload, and strips success-path `stdout_lines` so `details.execution` stays limited to the numeric code plus optional residual stderr diagnostics. Runtime is dominated by the delegated runner. Side effects depend on the selected tool.
5003
5014
  - @param[in] operation {() => ToolResult} Runner callback.
5004
5015
  - @return {ReturnType<typeof buildMonolithicToolExecuteResult>} Status-only tool execute result.
5005
5016
  - @satisfies REQ-294, REQ-295, REQ-296
5006
5017
 
5007
- ### fn `function deliverPromptCommand(` (L916-934)
5018
+ ### fn `function deliverPromptCommand(` (L921-970)
5008
5019
  - @brief Starts delivery of one rendered prompt into the current active session.
5009
- - @details Prefers the replacement-session `sendUserMessage(...)` helper exposed by `withSession(...)` callbacks after session replacement so post-switch prompt delivery never reuses stale pre-switch session-bound extension objects. Returns the underlying delivery promise without awaiting it so callers can record the `running` workflow transition as soon as prompt handoff is accepted instead of waiting for the full agent turn to complete on runtimes whose async replacement-session helpers resolve only after `agent_end`. When pi later invalidates that replacement-session context during successful prompt-end restoration, the helper suppresses the documented stale-extension-context rejection because the prompt was already accepted and late rethrow would surface a false orchestration failure. Falls back to `pi.sendUserMessage(...)` only for non-replacement flows or runtimes that do not expose replacement-session helpers. Runtime is O(n) in prompt length. Side effects are limited to user-message delivery.
5020
+ - @details Prefers the replacement-session `sendMessage(...)` helper exposed by `withSession(...)` callbacks after session replacement so post-switch prompt delivery never reuses stale pre-switch session-bound extension objects. Delivers the rendered prompt as a `display:false` custom message with `triggerTurn:true` so the full content reaches the LLM agent without appearing on screen, and emits a `display:true` command invocation summary so the TUI shows only the compact summary. Returns the underlying hidden-delivery promise without awaiting it so callers can record the `running` workflow transition as soon as prompt handoff is accepted instead of waiting for the full agent turn to complete on runtimes whose async replacement-session helpers resolve only after `agent_end`. When pi later invalidates that replacement-session context during successful prompt-end restoration, the helper suppresses the documented stale-extension-context rejection because the prompt was already accepted and late rethrow would surface a false orchestration failure. Falls back to `sendUserMessage(...)` only for non-replacement flows or runtimes that do not expose `sendMessage`. Runtime is O(n) in prompt length. Side effects are limited to hidden prompt delivery plus on-screen summary display.
5010
5021
  - @param[in] pi {ExtensionAPI} Handler-scoped extension API instance retained as the fallback dispatcher.
5011
5022
  - @param[in] content {string} Rendered prompt markdown.
5023
+ - @param[in] summary {string} Command invocation summary text displayed on screen.
5012
5024
  - @param[in] context {unknown} Optional replacement-session helper context.
5013
5025
  - @return {Promise<void>} Promise representing eventual prompt-delivery completion.
5014
- - @satisfies REQ-004, REQ-067, REQ-068, REQ-227, REQ-281
5026
+ - @satisfies REQ-004, REQ-067, REQ-068, REQ-227, REQ-281, REQ-334, REQ-335, DES-016
5015
5027
 
5016
- ### fn `function shouldIgnoreLatePromptDeliveryFailure(` (L945-961)
5028
+ ### fn `function shouldIgnoreLatePromptDeliveryFailure(` (L981-997)
5017
5029
  - @brief Detects prompt-delivery failures that can be ignored after prompt ownership has moved past the command handler.
5018
5030
  - @details Matches the documented stale-extension-context runtime error once prompt ownership has already moved beyond command-side preflight. The helper treats the failure as ignorable when the persisted prompt runtime state shows the same execution session as the active prompt run or when the persisted workflow state has already advanced beyond `checking|running`, because rethrowing at that point would incorrectly re-enter command-side abort logic after the prompt was already accepted. Runtime is O(n) in error-message length plus path length. No external state is mutated.
5019
5031
  - @param[in] error {unknown} Candidate prompt-delivery failure.
@@ -5022,7 +5034,7 @@ cost.
5022
5034
  - @return {boolean} `true` when the failure is a late stale-context delivery rejection that MUST be ignored.
5023
5035
  - @satisfies REQ-208, REQ-280, REQ-281, REQ-282
5024
5036
 
5025
- ### fn `function logPromptWorkflowStateChange(` (L974-993)
5037
+ ### fn `function logPromptWorkflowStateChange(` (L1010-1029)
5026
5038
  - @brief Appends one workflow-state debug entry for a bundled prompt when selected.
5027
5039
  - @details Reuses the shared debug logger so `req-*` command handlers and prompt-end orchestration can record deterministic workflow transitions without duplicating JSON payload shaping. Runtime is O(n) in serialized payload size only when logging is enabled and O(1) otherwise. Side effects include debug-log file writes for matching enabled prompts.
5028
5040
  - @param[in] projectBase {string} Absolute original project base path.
@@ -5033,7 +5045,7 @@ cost.
5033
5045
  - @return {void} No return value.
5034
5046
  - @satisfies REQ-245, REQ-246, REQ-247
5035
5047
 
5036
- ### fn `function logPromptWorkflowEvent(` (L1009-1029)
5048
+ ### fn `function logPromptWorkflowEvent(` (L1045-1065)
5037
5049
  - @brief Appends one dedicated prompt workflow debug entry when selected.
5038
5050
  - @details Reuses the shared workflow-event logger so prompt activation, restoration, closure, and session-shutdown paths can emit higher-granularity orchestration diagnostics without duplicating JSON payload shaping. Runtime is O(n) in serialized payload size only when logging is enabled and O(1) otherwise. Side effects include debug-log file writes for matching enabled prompts.
5039
5051
  - @param[in] projectBase {string} Absolute original project base path.
@@ -5047,7 +5059,7 @@ cost.
5047
5059
  - @return {void} No return value.
5048
5060
  - @satisfies REQ-245, REQ-246, REQ-247, REQ-277
5049
5061
 
5050
- ### fn `function transitionPromptWorkflowState(` (L1042-1055)
5062
+ ### fn `function transitionPromptWorkflowState(` (L1078-1091)
5051
5063
  - @brief Transitions one prompt workflow state and logs the transition immediately after the state update.
5052
5064
  - @details Captures the previous workflow state, applies the new state through the shared status helper, and appends the gated `workflow_state` debug entry only after the transition has completed. Runtime is O(1). Side effects include status mutation, status-bar rendering, and optional debug-log writes.
5053
5065
  - @param[in] ctx {ExtensionContext | ExtensionCommandContext} Active extension context.
@@ -5058,20 +5070,20 @@ cost.
5058
5070
  - @param[in,out] statusController {PiUsereqStatusController} Mutable status controller.
5059
5071
  - @return {void} No return value.
5060
5072
 
5061
- ### fn `function resolvePromptCommandDescription(` (L1063-1067)
5073
+ ### fn `function resolvePromptCommandDescription(` (L1099-1103)
5062
5074
  - @brief Resolves the runtime slash-command description for one bundled prompt.
5063
5075
  - @details Reads the bundled prompt markdown, extracts the first `# ` heading payload, and falls back to the historical generated label when the prompt omits a level-one heading. Runtime is O(n) in prompt length. Side effects are limited to filesystem reads.
5064
5076
  - @param[in] promptName {import("./core/prompt-command-catalog.js").PromptCommandName} Bundled prompt name.
5065
5077
  - @return {string} Runtime command description.
5066
5078
 
5067
- ### fn `function resolveDebugProjectBase(cwd: string, statusController: PiUsereqStatusController): string` (L1076-1080)
5079
+ ### fn `function resolveDebugProjectBase(cwd: string, statusController: PiUsereqStatusController): string` (L1112-1116)
5068
5080
  - @brief Resolves the original project base used for debug-log file writes.
5069
5081
  - @details Prefers the active or pending prompt execution plan so tool-result logging during worktree-backed prompt runs persists into the original repository path instead of transient worktree directories. Runtime is O(1). No external state is mutated.
5070
5082
  - @param[in] cwd {string} Current extension working directory.
5071
5083
  - @param[in] statusController {PiUsereqStatusController} Mutable status controller.
5072
5084
  - @return {string} Absolute original project base path for debug logging.
5073
5085
 
5074
- ### fn `function notifyContextSafely(` (L1091-1108)
5086
+ ### fn `function notifyContextSafely(` (L1127-1144)
5075
5087
  - @brief Delivers one best-effort UI notification without failing on stale replacement contexts.
5076
5088
  - @details Attempts to use the supplied extension context for UI notification delivery and suppresses the documented stale-extension-context runtime error raised after session replacement, because prompt-orchestration closure can outlive the context that initiated the switch. Runtime is O(n) in message length. Side effects are limited to user notification delivery when the context is still active.
5077
5089
  - @param[in] ctx {ExtensionContext | ExtensionCommandContext | undefined} Candidate UI context.
@@ -5080,7 +5092,7 @@ cost.
5080
5092
  - @return {boolean} `true` when the notification was delivered and `false` when the context was already stale.
5081
5093
  - @satisfies REQ-280
5082
5094
 
5083
- ### fn `function rejectNonIdleReqCommand(` (L1120-1140)
5095
+ ### fn `function rejectNonIdleReqCommand(` (L1156-1176)
5084
5096
  - @brief Rejects one non-`idle` req-command invocation and records the workflow error state.
5085
5097
  - @details Builds a deterministic busy-state diagnostic from the current workflow state, transitions the shared workflow state to `error`, preserves any pending or active prompt execution metadata for later closure handling, emits an error notification, and throws `ReqError`. Bundled prompt commands reuse `transitionPromptWorkflowState(...)` when cached configuration is available so prompt debug logging captures the actual state transition; specialized non-prompt commands fall back to direct status mutation. Runtime is O(1). Side effects include workflow-state mutation, status-bar rendering, optional debug-log writes, and user notification delivery.
5086
5098
  - @param[in] ctx {ExtensionContext | ExtensionCommandContext} Active extension context.
@@ -5090,20 +5102,20 @@ cost.
5090
5102
  - @throws {ReqError} Always throws because non-`idle` req commands are rejected.
5091
5103
  - @satisfies REQ-224
5092
5104
 
5093
- ### fn `function getPiUsereqStartupTools(pi: ExtensionAPI): ToolInfo[]` (L1149-1157)
5105
+ ### fn `function getPiUsereqStartupTools(pi: ExtensionAPI): ToolInfo[]` (L1185-1193)
5094
5106
  - @brief Returns the configurable active-tool inventory visible to the extension.
5095
5107
  - @details Filters runtime tools against the canonical configurable-tool set, keeps only builtin-backed embedded tools, and orders the result by the documented custom/files/embedded/default-disabled grouping. Runtime is O(t log t). No external state is mutated.
5096
5108
  - @param[in] pi {ExtensionAPI} Active extension API instance.
5097
5109
  - @return {ToolInfo[]} Sorted configurable tool descriptors.
5098
5110
  - @satisfies REQ-007, REQ-063, REQ-231, REQ-232
5099
5111
 
5100
- ### fn `function getConfiguredEnabledPiUsereqTools(config: UseReqConfig): string[]` (L1165-1169)
5112
+ ### fn `function getConfiguredEnabledPiUsereqTools(config: UseReqConfig): string[]` (L1201-1205)
5101
5113
  - @brief Normalizes and returns the configured enabled active tools.
5102
5114
  - @details Reuses repository normalization rules, updates the config object in place, and returns the normalized array. Runtime is O(n) in configured tool count. Side effect: mutates `config["enabled-tools"]`.
5103
5115
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5104
5116
  - @return {string[]} Normalized enabled tool names.
5105
5117
 
5106
- ### fn `function applyConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig): void` (L1179-1196)
5118
+ ### fn `function applyConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig): void` (L1215-1232)
5107
5119
  - @brief Applies the configured active-tool enablement to the current session.
5108
5120
  - @details Preserves non-configurable active tools, removes every configurable tool from the active set, then re-adds only configured tools that exist in the current runtime inventory. Runtime is O(t). Side effects include `pi.setActiveTools(...)`.
5109
5121
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5111,7 +5123,7 @@ cost.
5111
5123
  - @return {void} No return value.
5112
5124
  - @satisfies REQ-009, REQ-064
5113
5125
 
5114
- ### fn `async function handleExtensionStatusEvent(` (L1209-1480)
5126
+ ### fn `async function handleExtensionStatusEvent(` (L1245-1516)
5115
5127
  - @brief Handles one intercepted pi lifecycle hook for pi-usereq status updates.
5116
5128
  - @details Applies session-start-specific resource validation, project-config refresh, startup-tool enablement, and selected debug-tool logging before forwarding the originating hook name and payload into the shared `updateExtensionStatus(...)` pipeline. Before `agent_start`, re-verifies any prepared prompt execution session switch. On `agent_end`, dispatches configured command-notify, sound, and prompt-specific Pushover effects, logs dedicated workflow-closure diagnostics, restores the original session-backed `base-path` for every matched worktree-backed completion by reusing persisted replacement-session command contexts when event contexts omit `switchSession()`, executes the stash-assisted merge-and-delete finalization path for every matched successful worktree-backed completion even when a later busy-command rejection already moved workflow state to `error`, emits a warning-only notification when restored `base-path` changes are reapplied after merge, tolerates stale replacement-session notification contexts after session replacement, retains the worktree plus notifies closure failure for interrupted or failed outcomes, logs selected prompt workflow transitions, and transitions workflow state through `merging`, `error`, and `idle` as required. On `session_shutdown`, captures pre-update prompt snapshots so workflow-shutdown diagnostics and same-runtime command continuation preserve the active prompt workflow state across switch-triggered rebinding, then disposes the shared controller. Runtime is dominated by configuration loading during `session_start` and git finalization during matched successful `agent_end` handling; all other hooks are O(1). Side effects include resource checks, active-tool mutation, active-session replacement, status updates, live-ticker disposal on shutdown, optional child-process spawning, outbound HTTPS requests, branch merges, worktree deletion, and optional debug-log writes.
5117
5129
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5122,7 +5134,7 @@ cost.
5122
5134
  - @return {Promise<void>} Promise resolved when hook processing completes.
5123
5135
  - @satisfies REQ-117, REQ-118, REQ-119, REQ-131, REQ-132, REQ-133, REQ-166, REQ-167, REQ-168, REQ-169, REQ-172, REQ-176, REQ-178, REQ-184, REQ-185, REQ-186, REQ-187, REQ-208, REQ-209, REQ-221, REQ-228, REQ-229, REQ-230, REQ-244, REQ-245, REQ-246, REQ-247, REQ-276, REQ-277, REQ-278, REQ-279, REQ-280, REQ-291, REQ-292
5124
5136
 
5125
- ### fn `function registerExtensionStatusHooks(` (L1496-1515)
5137
+ ### fn `function registerExtensionStatusHooks(` (L1532-1551)
5126
5138
  - @brief Registers shared wrappers for every supported pi lifecycle hook.
5127
5139
  - @details Installs one generic wrapper per intercepted hook so every resource,
5128
5140
  session, agent, model, tool, bash, and input event is routed through the
@@ -5136,7 +5148,7 @@ registered hook count. Side effects include hook registration.
5136
5148
  - @return {void} No return value.
5137
5149
  - @satisfies DES-002, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117
5138
5150
 
5139
- ### fn `function setConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig, enabledTools: string[]): void` (L1525-1528)
5151
+ ### fn `function setConfiguredPiUsereqTools(pi: ExtensionAPI, config: UseReqConfig, enabledTools: string[]): void` (L1561-1564)
5140
5152
  - @brief Replaces the configured active-tool selection and applies it immediately.
5141
5153
  - @details Normalizes the requested tool names, stores them in config, and synchronizes the active tool set with runtime registration state. Runtime is O(n + t). Side effect: mutates config and active tools.
5142
5154
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5144,26 +5156,26 @@ registered hook count. Side effects include hook registration.
5144
5156
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5145
5157
  - @return {void} No return value.
5146
5158
 
5147
- ### fn `function getDebugToolToggleNames(): PiUsereqStartupToolName[]` (L1536-1538)
5159
+ ### fn `function getDebugToolToggleNames(): PiUsereqStartupToolName[]` (L1572-1574)
5148
5160
  - @brief Returns the canonical debug-tool toggle order.
5149
5161
  - @details Reuses the documented configurable-tool ordering so debug toggles list extension-owned tools before embedded tools and remain deterministic across sessions. Runtime is O(t log t). No external state is mutated.
5150
5162
  - @return {PiUsereqStartupToolName[]} Ordered debug-tool toggle names.
5151
5163
  - @satisfies REQ-242
5152
5164
 
5153
- ### fn `function resetDebugConfigToDefaults(config: UseReqConfig): void` (L1547-1556)
5165
+ ### fn `function resetDebugConfigToDefaults(config: UseReqConfig): void` (L1583-1592)
5154
5166
  - @brief Restores the debug configuration subtree to its documented defaults.
5155
5167
  - @details Resets global debug enablement, log path, tool-wrapper command registration, workflow-state filter, dedicated workflow-event logging, and selected tool plus prompt debug toggles without mutating unrelated settings. Runtime is O(1). Side effect: mutates `config`.
5156
5168
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5157
5169
  - @return {void} No return value.
5158
5170
  - @satisfies REQ-236, REQ-237, REQ-238, REQ-239, REQ-195, REQ-277, REQ-322
5159
5171
 
5160
- ### fn `function formatDebugMenuSummary(config: UseReqConfig): string` (L1564-1570)
5172
+ ### fn `function formatDebugMenuSummary(config: UseReqConfig): string` (L1600-1606)
5161
5173
  - @brief Formats the top-level Debug summary value.
5162
5174
  - @details Emits the current global debug mode plus compact selected-tool and selected-prompt counts for right-aligned menu display. Runtime is O(n) in configured selector count. No external state is mutated.
5163
5175
  - @param[in] config {UseReqConfig} Effective project configuration.
5164
5176
  - @return {string} Compact debug summary string.
5165
5177
 
5166
- ### fn `function buildDebugMenuChoice(` (L1580-1593)
5178
+ ### fn `function buildDebugMenuChoice(` (L1616-1629)
5167
5179
  - @brief Builds one debug-menu row with optional disabled styling.
5168
5180
  - @details Applies dim styling and disables selection whenever global debug is off for all rows except the global `Debug` toggle row. Runtime is O(1). No external state is mutated.
5169
5181
  - @param[in] choice {PiUsereqSettingsMenuChoice} Base debug-menu row.
@@ -5171,21 +5183,21 @@ registered hook count. Side effects include hook registration.
5171
5183
  - @return {PiUsereqSettingsMenuChoice} Styled debug-menu row.
5172
5184
  - @satisfies REQ-241
5173
5185
 
5174
- ### fn `async function selectDebugLogOnStatus(` (L1602-1630)
5186
+ ### fn `async function selectDebugLogOnStatus(` (L1638-1666)
5175
5187
  - @brief Opens the workflow-state filter selector used by the Debug submenu.
5176
5188
  - @details Exposes `any` plus each canonical workflow state through the shared settings-menu renderer and returns the selected normalized filter or `undefined` when the user cancels the submenu. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
5177
5189
  - @param[in] ctx {ExtensionCommandContext} Active command context.
5178
5190
  - @param[in] currentValue {DebugLogOnStatus} Current persisted workflow-state filter.
5179
5191
  - @return {Promise<DebugLogOnStatus | undefined>} Selected workflow-state filter or `undefined` when cancelled.
5180
5192
 
5181
- ### fn `function buildDebugMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1639-1725)
5193
+ ### fn `function buildDebugMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L1675-1761)
5182
5194
  - @brief Builds the shared settings-menu choices for debug logging configuration.
5183
5195
  - @details Serializes global debug controls plus tool-wrapper command registration, workflow-state, dedicated workflow-event, per-tool, and per-prompt toggles into one submenu, deriving inventories from the canonical tool and prompt lists and dimming locked rows while debug is disabled. Runtime is O(t + p). No external state is mutated.
5184
5196
  - @param[in] config {UseReqConfig} Effective project configuration.
5185
5197
  - @return {PiUsereqSettingsMenuChoice[]} Ordered debug-menu choices.
5186
5198
  - @satisfies REQ-240, REQ-241, REQ-242, REQ-243, REQ-193, REQ-277, REQ-321, REQ-322
5187
5199
 
5188
- ### fn `async function configureDebugMenu(` (L1736-1926)
5200
+ ### fn `async function configureDebugMenu(` (L1772-1962)
5189
5201
  - @brief Runs the interactive Debug submenu.
5190
5202
  - @details Lets the user toggle global debug enablement, tool-wrapper command registration, debug file and workflow filters, dedicated workflow-event logging, per-tool selectors, and per-prompt selectors while preserving row focus across re-renders. Runtime depends on user interaction count. Side effects include UI updates, config mutation, and optional debug command registration.
5191
5203
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5194,47 +5206,47 @@ registered hook count. Side effects include hook registration.
5194
5206
  - @return {Promise<void>} Promise resolved when the submenu closes.
5195
5207
  - @satisfies REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-241, REQ-242, REQ-243, REQ-192, REQ-193, REQ-195, REQ-277, REQ-321, REQ-322, REQ-323
5196
5208
 
5197
- ### fn `const updateDebugToolCommandsEnabled = (nextValue: unknown): void =>` (L1742-1749)
5209
+ ### fn `const updateDebugToolCommandsEnabled = (nextValue: unknown): void =>` (L1778-1785)
5198
5210
 
5199
- - type `type PiNotifyBooleanConfigKey =` (L1932)
5211
+ - type `type PiNotifyBooleanConfigKey =` (L1968)
5200
5212
  - @brief Represents one persisted boolean notification-setting key.
5201
5213
  - @details Restricts menu toggles to the global enable flags and completed/interrupted/failed event toggles used by command-notify, sound, and Pushover configuration. Compile-time only and introduces no runtime cost.
5202
- - type `type PiNotifyEventBooleanConfigKey = Exclude<` (L1949)
5214
+ - type `type PiNotifyEventBooleanConfigKey = Exclude<` (L1985)
5203
5215
  - @brief Represents one persisted boolean notification event-toggle key.
5204
5216
  - @details Restricts shared event-submenu mutation helpers to completed/interrupted/failed toggles and excludes global enable flags. Compile-time only and introduces no runtime cost.
5205
- - type `type PiNotifyEventId = "completed" | "interrupted" | "failed";` (L1958)
5217
+ - type `type PiNotifyEventId = "completed" | "interrupted" | "failed";` (L1994)
5206
5218
  - @brief Represents one shared prompt-end event identifier used by notification menus.
5207
5219
  - @details Restricts event-submenu rendering to the canonical completed/interrupted/failed domain shared by command-notify, sound, and Pushover routing. Compile-time only and introduces no runtime cost.
5208
- ### iface `interface PiNotifyEventRowDefinition` (L1964-1968)
5220
+ ### iface `interface PiNotifyEventRowDefinition` (L2000-2004)
5209
5221
  - @brief Describes one shared prompt-end event row rendered inside notification event submenus.
5210
5222
  - @details Binds one canonical event identifier to the human-readable label and terminal-outcome description reused across command-notify, sound, and Pushover event menus. The interface is compile-time only and introduces no runtime cost.
5211
5223
 
5212
- ### iface `interface PiNotifyEventMenuDefinition` (L1974-1980)
5224
+ ### iface `interface PiNotifyEventMenuDefinition` (L2010-2016)
5213
5225
  - @brief Describes one notification-system event submenu contract.
5214
5226
  - @details Binds the top-level launcher row, submenu title, toast prefix, and completed/interrupted/failed config keys for one notification transport. The interface is compile-time only and introduces no runtime cost.
5215
5227
 
5216
- ### fn `function togglePiNotifyFlag(config: UseReqConfig, key: PiNotifyBooleanConfigKey): boolean` (L1989-1992)
5228
+ ### fn `function togglePiNotifyFlag(config: UseReqConfig, key: PiNotifyBooleanConfigKey): boolean` (L2025-2028)
5217
5229
  - @brief Flips one persisted boolean notification setting.
5218
5230
  - @details Negates the selected configuration flag in place and returns the resulting boolean value so callers can emit deterministic UI feedback. Runtime is O(1). Side effect: mutates `config`.
5219
5231
  - @param[in] key {PiNotifyBooleanConfigKey} Boolean configuration key to toggle.
5220
5232
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5221
5233
  - @return {boolean} Next enabled state.
5222
5234
 
5223
- ### fn `function resetPiNotifyConfigToDefaults(config: UseReqConfig): void` (L2001-2025)
5235
+ ### fn `function resetPiNotifyConfigToDefaults(config: UseReqConfig): void` (L2037-2061)
5224
5236
  - @brief Restores notification-related settings to their documented defaults.
5225
5237
  - @details Copies the command-notify, sound, and Pushover configuration subtree from a fresh default config into the supplied mutable project config. Runtime is O(1). Side effect: mutates `config`.
5226
5238
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5227
5239
  - @return {void} No return value.
5228
5240
  - @satisfies REQ-174, REQ-178, REQ-184, REQ-195, REQ-196
5229
5241
 
5230
- ### fn `function formatPiNotifyPushoverPriority(priority: PiNotifyPushoverPriority): string` (L2034-2036)
5242
+ ### fn `function formatPiNotifyPushoverPriority(priority: PiNotifyPushoverPriority): string` (L2070-2072)
5231
5243
  - @brief Formats one persisted Pushover priority for menu display.
5232
5244
  - @details Maps the canonical `0|1` priority domain to deterministic `Normal|High` labels reused by the Pushover configuration UI. Runtime is O(1). No external state is mutated.
5233
5245
  - @param[in] priority {PiNotifyPushoverPriority} Persisted Pushover priority.
5234
5246
  - @return {string} Menu-display label.
5235
5247
  - @satisfies REQ-172
5236
5248
 
5237
- ### fn `function formatPiNotifyEventMenuSummary(` (L2120-2128)
5249
+ ### fn `function formatPiNotifyEventMenuSummary(` (L2156-2164)
5238
5250
  - @brief Formats the top-level summary value for one notification event submenu.
5239
5251
  - @details Counts enabled completed/interrupted/failed toggles for the selected transport and renders the result as `n/3 on` for right-aligned menu display. Runtime is O(1). No external state is mutated.
5240
5252
  - @param[in] config {UseReqConfig} Effective project configuration.
@@ -5242,7 +5254,7 @@ registered hook count. Side effects include hook registration.
5242
5254
  - @return {string} Compact enabled-toggle summary.
5243
5255
  - @satisfies REQ-198
5244
5256
 
5245
- ### fn `function buildPiNotifyEventLauncherChoice(` (L2138-2148)
5257
+ ### fn `function buildPiNotifyEventLauncherChoice(` (L2174-2184)
5246
5258
  - @brief Builds the top-level launcher row for one notification event submenu.
5247
5259
  - @details Reuses the shared completed/interrupted/failed summary renderer so the `Notifications` menu can expose dedicated event editors for command-notify, sound, and Pushover in a uniform shape. Runtime is O(1). No external state is mutated.
5248
5260
  - @param[in] config {UseReqConfig} Effective project configuration.
@@ -5250,7 +5262,7 @@ registered hook count. Side effects include hook registration.
5250
5262
  - @return {PiUsereqSettingsMenuChoice} Launcher row for the selected event submenu.
5251
5263
  - @satisfies REQ-181, REQ-183, REQ-165, REQ-198
5252
5264
 
5253
- ### fn `function buildPiNotifyEventMenuChoices(` (L2158-2174)
5265
+ ### fn `function buildPiNotifyEventMenuChoices(` (L2194-2210)
5254
5266
  - @brief Builds the shared settings-menu choices for one notification event submenu.
5255
5267
  - @details Serializes completed/interrupted/failed rows with right-aligned `on|off` values, then appends a value-less `Reset defaults` row for submenu-scoped mutation control. Runtime is O(1). No external state is mutated.
5256
5268
  - @param[in] config {UseReqConfig} Effective project configuration.
@@ -5258,7 +5270,7 @@ registered hook count. Side effects include hook registration.
5258
5270
  - @return {PiUsereqSettingsMenuChoice[]} Ordered event-submenu choice vector.
5259
5271
  - @satisfies REQ-188, REQ-193, REQ-198
5260
5272
 
5261
- ### fn `function resetPiNotifyEventMenuToDefaults(` (L2184-2192)
5273
+ ### fn `function resetPiNotifyEventMenuToDefaults(` (L2220-2228)
5262
5274
  - @brief Restores one notification event submenu to its documented defaults.
5263
5275
  - @details Copies only the completed/interrupted/failed toggles referenced by the supplied submenu contract from a fresh default config into the mutable project config. Runtime is O(1). Side effect: mutates `config`.
5264
5276
  - @param[in] eventMenu {PiNotifyEventMenuDefinition} Notification-system event submenu contract.
@@ -5266,7 +5278,7 @@ registered hook count. Side effects include hook registration.
5266
5278
  - @return {void} No return value.
5267
5279
  - @satisfies REQ-174, REQ-178, REQ-184, REQ-195
5268
5280
 
5269
- ### fn `function resolvePiNotifyEventLabel(` (L2202-2209)
5281
+ ### fn `function resolvePiNotifyEventLabel(` (L2238-2245)
5270
5282
  - @brief Resolves the human-readable event label for one event-toggle config key.
5271
5283
  - @details Matches the supplied config key against the submenu contract and returns the corresponding completed/interrupted/failed menu label for deterministic notification toasts. Runtime is O(1). No external state is mutated.
5272
5284
  - @param[in] key {PiNotifyEventBooleanConfigKey} Event-toggle configuration key.
@@ -5274,7 +5286,7 @@ registered hook count. Side effects include hook registration.
5274
5286
  - @return {string} Human-readable event label.
5275
5287
  - @satisfies REQ-188, REQ-198
5276
5288
 
5277
- ### fn `async function configurePiNotifyEventMenu(` (L2220-2296)
5289
+ ### fn `async function configurePiNotifyEventMenu(` (L2256-2332)
5278
5290
  - @brief Runs one dedicated notification event submenu.
5279
5291
  - @details Reuses the shared settings-menu renderer to toggle completed/interrupted/failed delivery flags, preserve row focus, and apply submenu-scoped reset semantics for command-notify, sound, or Pushover events. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
5280
5292
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5283,14 +5295,14 @@ registered hook count. Side effects include hook registration.
5283
5295
  - @return {Promise<void>} Promise resolved when the submenu closes.
5284
5296
  - @satisfies REQ-188, REQ-192, REQ-193, REQ-195, REQ-198
5285
5297
 
5286
- ### fn `function buildPiNotifyPushoverRows(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2305-2355)
5298
+ ### fn `function buildPiNotifyPushoverRows(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2341-2391)
5287
5299
  - @brief Builds the direct Pushover rows rendered inside `Notifications`.
5288
5300
  - @details Serializes the global enable flag, shared-event submenu launcher, priority, title, text, and credential rows into right-valued menu items appended after the sound-command rows, dims and disables the enable row until both credentials are populated, renders the locked value as `configure user/token keys first`, and escapes control characters for the single-line `Pushover text` value. Runtime is O(n) in the rendered text-template length. No external state is mutated.
5289
5301
  - @param[in] config {UseReqConfig} Effective project configuration.
5290
5302
  - @return {PiUsereqSettingsMenuChoice[]} Ordered direct Pushover rows.
5291
5303
  - @satisfies REQ-163, REQ-165, REQ-172, REQ-184, REQ-185, REQ-198, REQ-234, REQ-235
5292
5304
 
5293
- ### fn `async function selectPiNotifyPushoverPriority(` (L2365-2393)
5305
+ ### fn `async function selectPiNotifyPushoverPriority(` (L2401-2429)
5294
5306
  - @brief Opens the shared settings-menu selector for Pushover priority.
5295
5307
  - @details Reuses the pi-usereq settings-menu renderer so Pushover priority selection remains stylistically aligned with the notification menus and appends a value-less subtree-local `Reset defaults` row. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
5296
5308
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5298,14 +5310,14 @@ registered hook count. Side effects include hook registration.
5298
5310
  - @return {Promise<PiNotifyPushoverPriority | "reset-defaults" | undefined>} Selected priority, reset action, or `undefined` when cancelled.
5299
5311
  - @satisfies REQ-172, REQ-192
5300
5312
 
5301
- ### fn `function buildPiNotifyMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2402-2460)
5313
+ ### fn `function buildPiNotifyMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L2438-2496)
5302
5314
  - @brief Builds the shared settings-menu choices for notification configuration.
5303
5315
  - @details Serializes command-notify, sound, and Pushover blocks with dedicated shared-event submenu launchers so the settings-menu renderer can expose one unified but modular configuration surface, including locked Pushover enablement, persisted boot-sound rows that stay decoupled from the active runtime sound level, and escaped single-line rendering for `Pushover text`. Runtime is O(n) in the longest rendered command or text field. No external state is mutated.
5304
5316
  - @param[in] config {UseReqConfig} Effective project configuration.
5305
5317
  - @return {PiUsereqSettingsMenuChoice[]} Ordered notification-menu choice vector.
5306
5318
  - @satisfies REQ-137, REQ-149, REQ-150, REQ-151, REQ-152, REQ-163, REQ-164, REQ-165, REQ-172, REQ-179, REQ-181, REQ-183, REQ-188, REQ-193, REQ-198, REQ-234, REQ-235, REQ-289
5307
5319
 
5308
- ### fn `async function selectPiNotifySoundLevel(` (L2470-2510)
5320
+ ### fn `async function selectPiNotifySoundLevel(` (L2506-2546)
5309
5321
  - @brief Opens the shared settings-menu selector for the persisted boot sound level.
5310
5322
  - @details Reuses the pi-usereq settings-menu renderer so boot-sound selection remains stylistically aligned with the notification menu, keeps the active runtime sound level unchanged, and appends a value-less subtree-local `Reset defaults` row. Runtime depends on user interaction count. Side effects are limited to transient custom-UI rendering.
5311
5323
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5313,7 +5325,7 @@ registered hook count. Side effects include hook registration.
5313
5325
  - @return {Promise<PiNotifySoundLevel | "reset-defaults" | undefined>} Selected boot sound level, reset action, or `undefined` when cancelled.
5314
5326
  - @satisfies REQ-131, REQ-179, REQ-192, REQ-289
5315
5327
 
5316
- ### fn `async function configurePiNotifyMenu(` (L2520-2806)
5328
+ ### fn `async function configurePiNotifyMenu(` (L2556-2842)
5317
5329
  - @brief Runs the interactive notification-configuration menu.
5318
5330
  - @details Exposes command-notify, sound, and Pushover controls through the shared settings-menu renderer, persists every notification subtree mutation into global configuration, delegates completed/interrupted/failed toggles to dedicated event submenus, preserves boot-sound edits without altering the active runtime sound level, keeps `Enable pushover` locked until both credentials are populated, decodes escaped control-sequence input for `Pushover text`, and preserves row focus across menu re-renders. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
5319
5331
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5321,7 +5333,7 @@ registered hook count. Side effects include hook registration.
5321
5333
  - @return {Promise<boolean>} `true` when the sound-toggle shortcut changed.
5322
5334
  - @satisfies REQ-131, REQ-133, REQ-134, REQ-137, REQ-163, REQ-164, REQ-165, REQ-172, REQ-179, REQ-181, REQ-183, REQ-184, REQ-188, REQ-192, REQ-193, REQ-195, REQ-196, REQ-198, REQ-234, REQ-235, REQ-288, REQ-289
5323
5335
 
5324
- ### fn `function registerPiNotifyShortcut(` (L2821-2844)
5336
+ ### fn `function registerPiNotifyShortcut(` (L2857-2880)
5325
5337
  - @brief Registers the configurable notification-sound shortcut when supported.
5326
5338
  - @details Loads the current effective config, registers one raw pi shortcut when
5327
5339
  the runtime exposes `registerShortcut(...)`, cycles only the active runtime
@@ -5334,15 +5346,15 @@ registration and status updates.
5334
5346
  - @return {void} No return value.
5335
5347
  - @satisfies REQ-134, REQ-180, REQ-286, REQ-287
5336
5348
 
5337
- ### fn `function resolveReqResetPromptRequest(` (L2852-2878)
5349
+ ### fn `function resolveReqResetPromptRequest(` (L2888-2914)
5338
5350
  - @brief Resolves the prompt execution plan targeted by `req-reset` recovery.
5339
5351
  - @details Prefers the current in-memory active request, then the current in-memory pending request, then the process-scoped persisted prompt runtime state so the dedicated reset command can recover from same-host unclean prompt termination after session replacement. Runtime is O(1). No external state is mutated.
5340
5352
  - @param[in] statusController {PiUsereqStatusController} Mutable status controller.
5341
5353
  - @return {PromptCommandExecutionPlan | undefined} Recoverable prompt execution plan when one remains available.
5342
5354
 
5343
- ### fn `const isWorktreeBacked = (request: PromptCommandExecutionPlan | undefined): request is PromptCommandExecutionPlan =>` (L2855-2862)
5355
+ ### fn `const isWorktreeBacked = (request: PromptCommandExecutionPlan | undefined): request is PromptCommandExecutionPlan =>` (L2891-2898)
5344
5356
 
5345
- ### fn `function registerReqResetCommand(` (L2888-2942)
5357
+ ### fn `function registerReqResetCommand(` (L2924-2978)
5346
5358
  - @brief Registers the specialized `req-reset` slash command.
5347
5359
  - @details Registers the non-agentic prompt-recovery command that accepts any current workflow state, reuses persisted prompt runtime state when available, restores the original session-backed `base-path`, force-removes matching generated worktrees plus branches, clears recoverable prompt state when restoration succeeds, and notifies pi without starting an LLM session or creating a worktree. Runtime is dominated by session restoration plus git cleanup. Side effects include command registration, status-controller mutation, active-session replacement, worktree deletion, branch deletion, and user notifications.
5348
5360
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5350,7 +5362,7 @@ registration and status updates.
5350
5362
  - @return {void} No return value.
5351
5363
  - @satisfies REQ-304, REQ-305, REQ-306, REQ-307, REQ-308, REQ-309, REQ-310, REQ-311, REQ-312, REQ-313
5352
5364
 
5353
- ### fn `function registerReqReferencesCommand(` (L2952-2992)
5365
+ ### fn `function registerReqReferencesCommand(` (L2988-3028)
5354
5366
  - @brief Registers the specialized `req-references` slash command.
5355
5367
  - @details Registers the non-agentic references-maintenance command that rejects non-`idle` invocations by transitioning workflow state to `error` before direct execution, otherwise reuses slash-command-owned git validation, transitions workflow state through `checking|running|idle`, regenerates `REFERENCES.md` directly from configured source directories, stages only the generated file, creates the fixed-message git commit, verifies repository cleanliness, and notifies pi without starting an LLM session or creating a worktree. Runtime is dominated by git subprocess execution plus source-summary generation. Side effects include command registration, status-controller mutation, filesystem writes, git index/history mutation, and user notifications.
5356
5368
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5358,7 +5370,7 @@ registration and status updates.
5358
5370
  - @return {void} No return value.
5359
5371
  - @satisfies REQ-200, REQ-221, REQ-224, REQ-298, REQ-299, REQ-300, REQ-301, REQ-302, REQ-303
5360
5372
 
5361
- ### fn `function registerPromptCommands(` (L3002-3118)
5373
+ ### fn `function registerPromptCommands(` (L3038-3159)
5362
5374
  - @brief Registers bundled prompt-backed commands with the extension.
5363
5375
  - @details Creates one prompt-template-backed `req-<prompt>` command per bundled prompt name. Each handler rejects non-`idle` workflow state by transitioning the shared workflow state to `error` before command-side preflight, otherwise transitions the shared workflow state through `checking`, `error`, and `running`, runs dedicated prompt-command git and required-doc preflight checks, optionally prepares a dedicated worktree execution plan using the active session directory, persists the prompt metadata needed for switch-triggered rebinding, switches the active session to the verified execution cwd before prompt handoff, logs dedicated workflow-activation diagnostics, renders the prompt, starts prompt delivery into the forked active session, records `running` immediately after delivery handoff begins, and then awaits the wrapped prompt-delivery promise whose stale post-restore rejections are suppressed. Runtime is O(p) for registration; handler cost depends on prompt preflight, worktree preparation, session switching, prompt rendering, prompt dispatch, and optional debug logging. Side effects include command registration, status-controller mutation, worktree creation, active-session replacement, optional worktree rollback, user-message delivery during execution, and optional debug-log writes.
5364
5376
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5366,14 +5378,14 @@ registration and status updates.
5366
5378
  - @return {void} No return value.
5367
5379
  - @satisfies REQ-004, REQ-067, REQ-068, REQ-169, REQ-200, REQ-201, REQ-202, REQ-203, REQ-206, REQ-207, REQ-219, REQ-220, REQ-221, REQ-224, REQ-225, REQ-226, REQ-227, REQ-245, REQ-246, REQ-247, REQ-277, REQ-281
5368
5380
 
5369
- ### fn `function registerAgentTools(pi: ExtensionAPI): void` (L3128-3427)
5381
+ ### fn `function registerAgentTools(pi: ExtensionAPI): void` (L3169-3468)
5370
5382
  - @brief Registers pi-usereq agent tools exposed to the model.
5371
5383
  - @details Defines the tool schemas, prompt metadata, and execution handlers that bridge extension tool calls into tool-runner operations without registering duplicate custom slash commands for the same capabilities. Runtime is O(t) for registration; execution cost depends on the selected tool. Side effects include tool registration.
5372
5384
  - @param[in] pi {ExtensionAPI} Active extension API instance.
5373
5385
  - @return {void} No return value.
5374
5386
  - @satisfies REQ-005, REQ-010, REQ-011, REQ-014, REQ-017, REQ-044, REQ-069, REQ-070, REQ-071, REQ-072, REQ-073, REQ-074, REQ-075, REQ-076, REQ-077, REQ-078, REQ-079, REQ-080, REQ-089, REQ-090, REQ-091, REQ-092, REQ-093, REQ-094, REQ-095, REQ-096, REQ-097, REQ-098, REQ-099, REQ-100, REQ-101, REQ-102, REQ-293, REQ-294, REQ-295, REQ-296, REQ-297
5375
5387
 
5376
- ### fn `function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3472-3497)
5388
+ ### fn `function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3513-3538)
5377
5389
  - @brief Builds the shared settings-menu choices for startup-tool management.
5378
5390
  - @details Serializes startup-tool actions into right-valued menu rows consumed by the shared settings-menu renderer while omitting the removed status-reference action. Runtime is O(t) in configurable-tool count. No external state is mutated.
5379
5391
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5381,7 +5393,7 @@ registration and status updates.
5381
5393
  - @return {PiUsereqSettingsMenuChoice[]} Ordered startup-tool menu choices.
5382
5394
  - @satisfies REQ-007, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-193
5383
5395
 
5384
- ### fn `function buildPiUsereqToolToggleChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3507-3521)
5396
+ ### fn `function buildPiUsereqToolToggleChoices(pi: ExtensionAPI, config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3548-3562)
5385
5397
  - @brief Builds the shared settings-menu choices for per-tool startup toggles.
5386
5398
  - @details Exposes every configurable startup tool as one row whose right-side value reports the current enabled state, preserves the documented custom/files/embedded/default-disabled ordering, and appends a value-less subtree-local `Reset defaults` row. Runtime is O(t) in configurable-tool count. No external state is mutated.
5387
5399
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5389,7 +5401,7 @@ registration and status updates.
5389
5401
  - @return {PiUsereqSettingsMenuChoice[]} Ordered per-tool toggle choices.
5390
5402
  - @satisfies REQ-007, REQ-151, REQ-152, REQ-153, REQ-154, REQ-231, REQ-232
5391
5403
 
5392
- ### fn `async function configurePiUsereqToolsMenu(` (L3532-3649)
5404
+ ### fn `async function configurePiUsereqToolsMenu(` (L3573-3690)
5393
5405
  - @brief Runs the interactive active-tool configuration menu.
5394
5406
  - @details Synchronizes runtime active tools with the effective config, renders startup-tool actions through the shared settings-menu UI, persists enablement changes into global configuration, preserves the documented per-tool ordering, and updates configuration state in response to selections until the user exits. Runtime depends on user interaction count. Side effects include UI updates, active-tool changes, and config mutation.
5395
5407
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5398,58 +5410,58 @@ registration and status updates.
5398
5410
  - @return {Promise<void>} Promise resolved when the menu closes.
5399
5411
  - @satisfies REQ-007, REQ-063, REQ-064, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-193, REQ-231, REQ-232
5400
5412
 
5401
- ### fn `function getStaticCheckLanguageConfigForMenu(` (L3658-3663)
5413
+ ### fn `function getStaticCheckLanguageConfigForMenu(` (L3699-3704)
5402
5414
  - @brief Resolves one static-check language config for menu rendering.
5403
5415
  - @details Returns the configured per-language static-check object when present and otherwise synthesizes a disabled empty-language object so menu code can render all supported languages deterministically. Runtime is O(1). No external state is mutated.
5404
5416
  - @param[in] config {UseReqConfig} Effective project configuration.
5405
5417
  - @param[in] language {string} Canonical language name.
5406
5418
  - @return {StaticCheckLanguageConfig} Resolved per-language config object.
5407
5419
 
5408
- ### fn `function countConfiguredStaticCheckLanguages(config: UseReqConfig): number` (L3671-3673)
5420
+ ### fn `function countConfiguredStaticCheckLanguages(config: UseReqConfig): number` (L3712-3714)
5409
5421
  - @brief Counts languages that currently expose at least one configured checker.
5410
5422
  - @details Treats configured-but-disabled languages as configured when their checker list is non-empty so removal actions remain deterministic. Runtime is O(l). No external state is mutated.
5411
5423
  - @param[in] config {UseReqConfig} Effective project configuration.
5412
5424
  - @return {number} Number of languages with at least one configured checker.
5413
5425
 
5414
- ### fn `function countEnabledStaticCheckLanguages(config: UseReqConfig): number` (L3681-3683)
5426
+ ### fn `function countEnabledStaticCheckLanguages(config: UseReqConfig): number` (L3722-3724)
5415
5427
  - @brief Counts languages whose static-check enable flag is on.
5416
5428
  - @details Counts only languages whose persisted per-language config explicitly sets `enabled=enable`, regardless of checker count. Runtime is O(l). No external state is mutated.
5417
5429
  - @param[in] config {UseReqConfig} Effective project configuration.
5418
5430
  - @return {number} Number of enabled languages.
5419
5431
 
5420
- ### fn `function resetStaticCheckConfig(config: UseReqConfig): void` (L3692-3694)
5432
+ ### fn `function resetStaticCheckConfig(config: UseReqConfig): void` (L3733-3735)
5421
5433
  - @brief Restores the documented static-check default configuration.
5422
5434
  - @details Replaces the mutable config subtree with a fresh clone of the documented per-language defaults so menu reset actions restore both enable flags and checker lists in one step. Runtime is O(l + c). Side effect: mutates `config`.
5423
5435
  - @param[in,out] config {UseReqConfig} Mutable configuration object.
5424
5436
  - @return {void} No return value.
5425
5437
  - @satisfies REQ-250, REQ-251, REQ-252
5426
5438
 
5427
- ### fn `function formatStaticCheckLanguagesSummary(config: UseReqConfig): string` (L3702-3704)
5439
+ ### fn `function formatStaticCheckLanguagesSummary(config: UseReqConfig): string` (L3743-3745)
5428
5440
  - @brief Summarizes enabled and configured static-check languages.
5429
5441
  - @details Counts enabled languages and languages with at least one checker, then emits one compact summary string suitable for the top-level configuration menu. Runtime is O(l). No external state is mutated.
5430
5442
  - @param[in] config {UseReqConfig} Effective project configuration.
5431
5443
  - @return {string} Compact summary string.
5432
5444
 
5433
- ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3713-3745)
5445
+ ### fn `function buildStaticCheckMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3754-3786)
5434
5446
  - @brief Builds the shared settings-menu choices for static-check management.
5435
5447
  - @details Serializes guided Command-oriented add and remove actions, renders one direct on/off toggle row for every supported language, and appends canonical terminal rows while omitting raw-spec and reference-only actions. Runtime is O(l). No external state is mutated.
5436
5448
  - @param[in] config {UseReqConfig} Effective project configuration.
5437
5449
  - @return {PiUsereqSettingsMenuChoice[]} Ordered static-check menu choices.
5438
5450
  - @satisfies REQ-008, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-160, REQ-161, REQ-193, REQ-248
5439
5451
 
5440
- ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3753-3770)
5452
+ ### fn `function buildSupportedStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3794-3811)
5441
5453
  - @brief Builds the shared settings-menu choices for supported static-check languages.
5442
5454
  - @details Exposes every supported language as one row whose right-side value reports extensions, enablement, and configured checker count for guided Command configuration flows, then appends subtree-local terminal rows. Runtime is O(l). No external state is mutated.
5443
5455
  - @param[in] config {UseReqConfig} Effective project configuration.
5444
5456
  - @return {PiUsereqSettingsMenuChoice[]} Ordered language-choice vector.
5445
5457
 
5446
- ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3778-3795)
5458
+ ### fn `function buildConfiguredStaticCheckLanguageChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3819-3836)
5447
5459
  - @brief Builds the shared settings-menu choices for configured static-check languages.
5448
5460
  - @details Exposes only languages whose checker lists are non-empty so removal remains deterministic, then appends subtree-local terminal rows. Runtime is O(l). No external state is mutated.
5449
5461
  - @param[in] config {UseReqConfig} Effective project configuration.
5450
5462
  - @return {PiUsereqSettingsMenuChoice[]} Ordered configured-language vector.
5451
5463
 
5452
- ### fn `async function configureStaticCheckMenu(` (L3805-3951)
5464
+ ### fn `async function configureStaticCheckMenu(` (L3846-3992)
5453
5465
  - @brief Runs the interactive static-check configuration menu.
5454
5466
  - @details Lets the user add and remove global Command entries, toggle direct local per-language enable flags, and reset the subtree to documented defaults through the shared settings-menu renderer until the user exits. Runtime depends on user interaction count. Side effects include UI updates and config mutation.
5455
5467
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5457,21 +5469,21 @@ registration and status updates.
5457
5469
  - @return {Promise<void>} Promise resolved when the menu closes.
5458
5470
  - @satisfies REQ-008, REQ-151, REQ-152, REQ-153, REQ-154, REQ-160, REQ-161, REQ-193, REQ-195, REQ-248, REQ-253
5459
5471
 
5460
- ### fn `function formatContextFilesSummary(config: UseReqConfig): string` (L3960-3962)
5472
+ ### fn `function formatContextFilesSummary(config: UseReqConfig): string` (L4001-4003)
5461
5473
  - @brief Summarizes the `Context Files` flag state for the top-level menu value column.
5462
5474
  - @details Renders the three context-file flags as compact `name:on|off` segments in the documented order so the top-level row reflects the current injection configuration. Runtime is O(1). No external state is mutated.
5463
5475
  - @param[in] config {UseReqConfig} Effective project configuration.
5464
5476
  - @return {string} Compact `Context Files` summary string.
5465
5477
  - @satisfies REQ-327
5466
5478
 
5467
- ### fn `function buildContextFilesMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L3971-3998)
5479
+ ### fn `function buildContextFilesMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4012-4039)
5468
5480
  - @brief Builds the shared settings-menu choices for the `Context Files` submenu.
5469
5481
  - @details Exposes one inline on|off toggle row per context file in the documented `REQUIREMENTS.md`, `REFERENCES.md`, `WORKFLOW.md` order plus a value-less subtree-local `Reset defaults` row. Runtime is O(1). No external state is mutated.
5470
5482
  - @param[in] config {UseReqConfig} Effective project configuration.
5471
5483
  - @return {PiUsereqSettingsMenuChoice[]} Ordered `Context Files` submenu choices.
5472
5484
  - @satisfies REQ-327, REQ-328, REQ-333
5473
5485
 
5474
- ### fn `async function configureContextFilesMenu(` (L4009-4067)
5486
+ ### fn `async function configureContextFilesMenu(` (L4050-4108)
5475
5487
  - @brief Runs the `Context Files` configuration submenu.
5476
5488
  - @details Loads the shared settings menu with the three context-file toggle rows, persists each inline toggle immediately through the shared change callback, restores all three flags to enabled on approved subtree reset, preserves focus on the toggled row, and returns to the top-level menu on cancel. Runtime depends on user interaction count. Side effects include config writes and UI notifications.
5477
5489
  - @param[in] ctx {ExtensionCommandContext} Active command context.
@@ -5480,9 +5492,9 @@ registration and status updates.
5480
5492
  - @return {Promise<void>} Promise resolved when the submenu closes.
5481
5493
  - @satisfies REQ-327, REQ-328, REQ-333
5482
5494
 
5483
- ### fn `const setFlag = (flagKey: "context-files-requirements" | "context-files-references" | "context-files-workflow", enabled: boolean): void =>` (L4014-4018)
5495
+ ### fn `const setFlag = (flagKey: "context-files-requirements" | "context-files-references" | "context-files-workflow", enabled: boolean): void =>` (L4055-4059)
5484
5496
 
5485
- ### fn `function buildPiUsereqMenuChoices(` (L4077-4182)
5497
+ ### fn `function buildPiUsereqMenuChoices(` (L4118-4223)
5486
5498
  - @brief Builds the shared settings-menu choices for the top-level pi-usereq configuration UI.
5487
5499
  - @details Serializes primary configuration actions into right-valued menu rows consumed by the shared settings-menu renderer, including the `Context Files` injection toggles, automatic git-commit mode, effective prompt-command worktree state, notification summary, debug summary, locked worktree rows when automatic git commit is disabled, and display-only local plus global config paths. Runtime is O(s) in source-directory count. No external state is mutated.
5488
5500
  - @param[in] cwd {string} Current working directory.
@@ -5490,21 +5502,21 @@ registration and status updates.
5490
5502
  - @return {PiUsereqSettingsMenuChoice[]} Ordered top-level menu choices.
5491
5503
  - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-162, REQ-190, REQ-191, REQ-197, REQ-204, REQ-205, REQ-212, REQ-215, REQ-216, REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-314, REQ-318, REQ-319, REQ-320, REQ-326
5492
5504
 
5493
- ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4191-4209)
5505
+ ### fn `function buildSrcDirMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4232-4250)
5494
5506
  - @brief Builds the shared settings-menu choices for source-directory management.
5495
5507
  - @details Exposes add and remove actions for `src-dir` entries through right-valued menu rows consumed by the shared settings-menu renderer. Runtime is O(s) in source-directory count. No external state is mutated.
5496
5508
  - @param[in] config {UseReqConfig} Effective project configuration.
5497
5509
  - @return {PiUsereqSettingsMenuChoice[]} Ordered source-directory management choices.
5498
5510
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154, REQ-193
5499
5511
 
5500
- ### fn `function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4218-4230)
5512
+ ### fn `function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[]` (L4259-4271)
5501
5513
  - @brief Builds the shared settings-menu choices for removing one source-directory entry.
5502
5514
  - @details Exposes every configured `src-dir` entry as one removable row and appends a value-less subtree-local `Reset defaults` row. Runtime is O(s) in source-directory count. No external state is mutated.
5503
5515
  - @param[in] config {UseReqConfig} Effective project configuration.
5504
5516
  - @return {PiUsereqSettingsMenuChoice[]} Ordered removable source-directory choices.
5505
5517
  - @satisfies REQ-006, REQ-151, REQ-152, REQ-153, REQ-154
5506
5518
 
5507
- ### fn `async function configurePiUsereq(` (L4241-4499)
5519
+ ### fn `async function configurePiUsereq(` (L4282-4540)
5508
5520
  - @brief Runs the top-level pi-usereq configuration menu.
5509
5521
  - @details Loads the effective merged config, exposes docs/test/source/automatic-commit/worktree/static-check/startup-tool/notification/debug actions through the shared settings-menu renderer, forces worktree disablement when automatic git commit is disabled, prevents locked row edits, persists changes on exit, closes immediately after `Show local configuration` or `Show global configuration`, and refreshes the single-line status bar. Runtime depends on user interaction count. Side effects include UI updates, config writes, active-tool changes, and editor text updates.
5510
5522
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5513,9 +5525,9 @@ registration and status updates.
5513
5525
  - @return {Promise<void>} Promise resolved when configuration is saved and the menu closes.
5514
5526
  - @satisfies REQ-006, REQ-031, REQ-137, REQ-150, REQ-151, REQ-152, REQ-153, REQ-154, REQ-162, REQ-190, REQ-191, REQ-192, REQ-194, REQ-195, REQ-204, REQ-205, REQ-212, REQ-215, REQ-216, REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-241, REQ-242, REQ-243, REQ-314, REQ-318, REQ-319, REQ-320, REQ-326, REQ-327, REQ-328, REQ-333
5515
5527
 
5516
- ### fn `const persistConfigChange = () =>` (L4252-4257)
5528
+ ### fn `const persistConfigChange = () =>` (L4293-4298)
5517
5529
 
5518
- ### fn `function registerConfigCommands(` (L4509-4519)
5530
+ ### fn `function registerConfigCommands(` (L4550-4560)
5519
5531
  - @brief Registers configuration-management commands.
5520
5532
  - @details Adds the interactive `pi-usereq` configuration command only; the config-viewer action is now exposed exclusively inside that menu. Runtime is O(1) for registration. Side effects include command registration.
5521
5533
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5523,7 +5535,7 @@ registration and status updates.
5523
5535
  - @return {void} No return value.
5524
5536
  - @satisfies REQ-006, REQ-031
5525
5537
 
5526
- ### fn `export default function piUsereqExtension(pi: ExtensionAPI): void` (L4528-4541)
5538
+ ### fn `export default function piUsereqExtension(pi: ExtensionAPI): void` (L4569-4582)
5527
5539
  - @brief Registers the complete pi-usereq extension.
5528
5540
  - @details Validates installation-owned bundled resources, registers the specialized `req-reset` and `req-references` commands plus bundled prompt-backed commands and agent tools, conditionally registers config-gated debug tool wrapper commands when the current project enables them, registers configuration commands, registers the configurable notification-sound shortcut when the runtime supports shortcuts, and installs shared wrappers for all supported pi lifecycle hooks so status telemetry, context usage, prompt timing, cumulative runtime, prompt-specific Pushover metadata, tool-result debug logging, and prompt-orchestration effects remain synchronized with runtime events. Runtime is O(h) in hook count during registration. Side effects include filesystem reads, command/tool/shortcut registration, UI updates, active-tool changes, optional debug-log writes, and timer scheduling.
5529
5541
  - @param[in] pi {ExtensionAPI} Active extension API instance.
@@ -5533,110 +5545,110 @@ registration and status updates.
5533
5545
  ## Symbol Index
5534
5546
  |Symbol|Kind|Vis|Lines|Sig|
5535
5547
  |---|---|---|---|---|
5536
- |`PiShortcutRegistrar`|iface||182-190|interface PiShortcutRegistrar|
5537
- |`getProjectBase`|fn||198-207|function getProjectBase(cwd: string): string|
5538
- |`getProcessCwdSafe`|fn||214-223|function getProcessCwdSafe(): string|
5539
- |`resolveLiveBootstrapCwd`|fn||231-243|function resolveLiveBootstrapCwd(cwd: string): string|
5540
- |`syncContextCwdMirror`|fn||252-261|function syncContextCwdMirror(ctx: { cwd?: string }, cwd:...|
5541
- |`loadProjectConfig`|fn||270-273|function loadProjectConfig(cwd: string): UseReqConfig|
5542
- |`DebugToolCommandExecuteResult`|type||279||
5543
- |`shouldRegisterDebugToolCommands`|fn||288-294|function shouldRegisterDebugToolCommands(cwd: string): bo...|
5544
- |`writeDebugToolCommandResultToEditor`|fn||305-319|function writeDebugToolCommandResultToEditor(|
5545
- |`executeDebugToolCommand`|fn||331-349|function executeDebugToolCommand(|
5546
- |`registerDebugToolCommands`|fn||358-397|function registerDebugToolCommands(pi: ExtensionAPI): void|
5547
- |`saveProjectConfig`|fn||407-410|function saveProjectConfig(cwd: string, config: UseReqCon...|
5548
- |`formatLocalConfigPathForMenu`|fn||419-423|function formatLocalConfigPathForMenu(cwd: string): string|
5549
- |`formatGlobalConfigPathForMenu`|fn||431-433|function formatGlobalConfigPathForMenu(): string|
5550
- |`buildTerminalSettingsMenuChoices`|fn||442-453|function buildTerminalSettingsMenuChoices(options:|
5551
- |`ResetConfirmationChange`|iface||459-463|interface ResetConfirmationChange|
5552
- |`formatResetConfirmationValue`|fn||472-474|function formatResetConfirmationValue(previousValue: stri...|
5553
- |`buildResetConfirmationChoices`|fn||484-523|function buildResetConfirmationChoices(|
5554
- |`confirmResetChanges`|fn||535-548|async function confirmResetChanges(|
5555
- |`writePersistedConfigToEditor`|fn||557-562|function writePersistedConfigToEditor(|
5556
- |`writePersistedLocalConfigToEditor`|fn||572-578|function writePersistedLocalConfigToEditor(|
5557
- |`writePersistedGlobalConfigToEditor`|fn||587-591|function writePersistedGlobalConfigToEditor(|
5558
- |`buildSearchToolSupportedTagGuidelines`|fn||652-656|function buildSearchToolSupportedTagGuidelines(): string[]|
5559
- |`buildSearchToolSchemaDescription`|fn||664-669|function buildSearchToolSchemaDescription(scope: FindTool...|
5560
- |`buildSearchToolPromptGuidelines`|fn||677-690|function buildSearchToolPromptGuidelines(scope: FindToolS...|
5561
- |`MonolithicToolRenderResult`|type||696||
5562
- |`getMonolithicToolText`|fn||713-716|function getMonolithicToolText(result: MonolithicToolRend...|
5563
- |`getMonolithicToolErrorText`|fn||724-734|function getMonolithicToolErrorText(result: MonolithicToo...|
5564
- |`formatCompactToolArgumentValue`|fn||742-781|function formatCompactToolArgumentValue(value: unknown): ...|
5565
- |`buildCompactToolInvocationText`|fn||789-800|function buildCompactToolInvocationText(args: Record<stri...|
5566
- |`summarizeStructuredToolResult`|fn||810-825|function summarizeStructuredToolResult(|
5567
- |`buildStructuredToolRenderResult`|fn||834-853|function buildStructuredToolRenderResult(toolName: string)|
5568
- |`executeMonolithicTool`|fn||861-867|function executeMonolithicTool(operation: () => ToolResul...|
5569
- |`executeStatusTool`|fn||876-905|function executeStatusTool(operation: () => ToolResult): ...|
5570
- |`deliverPromptCommand`|fn||916-934|function deliverPromptCommand(|
5571
- |`shouldIgnoreLatePromptDeliveryFailure`|fn||945-961|function shouldIgnoreLatePromptDeliveryFailure(|
5572
- |`logPromptWorkflowStateChange`|fn||974-993|function logPromptWorkflowStateChange(|
5573
- |`logPromptWorkflowEvent`|fn||1009-1029|function logPromptWorkflowEvent(|
5574
- |`transitionPromptWorkflowState`|fn||1042-1055|function transitionPromptWorkflowState(|
5575
- |`resolvePromptCommandDescription`|fn||1063-1067|function resolvePromptCommandDescription(|
5576
- |`resolveDebugProjectBase`|fn||1076-1080|function resolveDebugProjectBase(cwd: string, statusContr...|
5577
- |`notifyContextSafely`|fn||1091-1108|function notifyContextSafely(|
5578
- |`rejectNonIdleReqCommand`|fn||1120-1140|function rejectNonIdleReqCommand(|
5579
- |`getPiUsereqStartupTools`|fn||1149-1157|function getPiUsereqStartupTools(pi: ExtensionAPI): ToolI...|
5580
- |`getConfiguredEnabledPiUsereqTools`|fn||1165-1169|function getConfiguredEnabledPiUsereqTools(config: UseReq...|
5581
- |`applyConfiguredPiUsereqTools`|fn||1179-1196|function applyConfiguredPiUsereqTools(pi: ExtensionAPI, c...|
5582
- |`handleExtensionStatusEvent`|fn||1209-1480|async function handleExtensionStatusEvent(|
5583
- |`registerExtensionStatusHooks`|fn||1496-1515|function registerExtensionStatusHooks(|
5584
- |`setConfiguredPiUsereqTools`|fn||1525-1528|function setConfiguredPiUsereqTools(pi: ExtensionAPI, con...|
5585
- |`getDebugToolToggleNames`|fn||1536-1538|function getDebugToolToggleNames(): PiUsereqStartupToolNa...|
5586
- |`resetDebugConfigToDefaults`|fn||1547-1556|function resetDebugConfigToDefaults(config: UseReqConfig)...|
5587
- |`formatDebugMenuSummary`|fn||1564-1570|function formatDebugMenuSummary(config: UseReqConfig): st...|
5588
- |`buildDebugMenuChoice`|fn||1580-1593|function buildDebugMenuChoice(|
5589
- |`selectDebugLogOnStatus`|fn||1602-1630|async function selectDebugLogOnStatus(|
5590
- |`buildDebugMenuChoices`|fn||1639-1725|function buildDebugMenuChoices(config: UseReqConfig): PiU...|
5591
- |`configureDebugMenu`|fn||1736-1926|async function configureDebugMenu(|
5592
- |`updateDebugToolCommandsEnabled`|fn||1742-1749|const updateDebugToolCommandsEnabled = (nextValue: unknow...|
5593
- |`PiNotifyBooleanConfigKey`|type||1932||
5594
- |`PiNotifyEventBooleanConfigKey`|type||1949||
5595
- |`PiNotifyEventId`|type||1958||
5596
- |`PiNotifyEventRowDefinition`|iface||1964-1968|interface PiNotifyEventRowDefinition|
5597
- |`PiNotifyEventMenuDefinition`|iface||1974-1980|interface PiNotifyEventMenuDefinition|
5598
- |`togglePiNotifyFlag`|fn||1989-1992|function togglePiNotifyFlag(config: UseReqConfig, key: Pi...|
5599
- |`resetPiNotifyConfigToDefaults`|fn||2001-2025|function resetPiNotifyConfigToDefaults(config: UseReqConf...|
5600
- |`formatPiNotifyPushoverPriority`|fn||2034-2036|function formatPiNotifyPushoverPriority(priority: PiNotif...|
5601
- |`formatPiNotifyEventMenuSummary`|fn||2120-2128|function formatPiNotifyEventMenuSummary(|
5602
- |`buildPiNotifyEventLauncherChoice`|fn||2138-2148|function buildPiNotifyEventLauncherChoice(|
5603
- |`buildPiNotifyEventMenuChoices`|fn||2158-2174|function buildPiNotifyEventMenuChoices(|
5604
- |`resetPiNotifyEventMenuToDefaults`|fn||2184-2192|function resetPiNotifyEventMenuToDefaults(|
5605
- |`resolvePiNotifyEventLabel`|fn||2202-2209|function resolvePiNotifyEventLabel(|
5606
- |`configurePiNotifyEventMenu`|fn||2220-2296|async function configurePiNotifyEventMenu(|
5607
- |`buildPiNotifyPushoverRows`|fn||2305-2355|function buildPiNotifyPushoverRows(config: UseReqConfig):...|
5608
- |`selectPiNotifyPushoverPriority`|fn||2365-2393|async function selectPiNotifyPushoverPriority(|
5609
- |`buildPiNotifyMenuChoices`|fn||2402-2460|function buildPiNotifyMenuChoices(config: UseReqConfig): ...|
5610
- |`selectPiNotifySoundLevel`|fn||2470-2510|async function selectPiNotifySoundLevel(|
5611
- |`configurePiNotifyMenu`|fn||2520-2806|async function configurePiNotifyMenu(|
5612
- |`registerPiNotifyShortcut`|fn||2821-2844|function registerPiNotifyShortcut(|
5613
- |`resolveReqResetPromptRequest`|fn||2852-2878|function resolveReqResetPromptRequest(|
5614
- |`isWorktreeBacked`|fn||2855-2862|const isWorktreeBacked = (request: PromptCommandExecution...|
5615
- |`registerReqResetCommand`|fn||2888-2942|function registerReqResetCommand(|
5616
- |`registerReqReferencesCommand`|fn||2952-2992|function registerReqReferencesCommand(|
5617
- |`registerPromptCommands`|fn||3002-3118|function registerPromptCommands(|
5618
- |`registerAgentTools`|fn||3128-3427|function registerAgentTools(pi: ExtensionAPI): void|
5619
- |`buildPiUsereqToolsMenuChoices`|fn||3472-3497|function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, ...|
5620
- |`buildPiUsereqToolToggleChoices`|fn||3507-3521|function buildPiUsereqToolToggleChoices(pi: ExtensionAPI,...|
5621
- |`configurePiUsereqToolsMenu`|fn||3532-3649|async function configurePiUsereqToolsMenu(|
5622
- |`getStaticCheckLanguageConfigForMenu`|fn||3658-3663|function getStaticCheckLanguageConfigForMenu(|
5623
- |`countConfiguredStaticCheckLanguages`|fn||3671-3673|function countConfiguredStaticCheckLanguages(config: UseR...|
5624
- |`countEnabledStaticCheckLanguages`|fn||3681-3683|function countEnabledStaticCheckLanguages(config: UseReqC...|
5625
- |`resetStaticCheckConfig`|fn||3692-3694|function resetStaticCheckConfig(config: UseReqConfig): void|
5626
- |`formatStaticCheckLanguagesSummary`|fn||3702-3704|function formatStaticCheckLanguagesSummary(config: UseReq...|
5627
- |`buildStaticCheckMenuChoices`|fn||3713-3745|function buildStaticCheckMenuChoices(config: UseReqConfig...|
5628
- |`buildSupportedStaticCheckLanguageChoices`|fn||3753-3770|function buildSupportedStaticCheckLanguageChoices(config:...|
5629
- |`buildConfiguredStaticCheckLanguageChoices`|fn||3778-3795|function buildConfiguredStaticCheckLanguageChoices(config...|
5630
- |`configureStaticCheckMenu`|fn||3805-3951|async function configureStaticCheckMenu(|
5631
- |`formatContextFilesSummary`|fn||3960-3962|function formatContextFilesSummary(config: UseReqConfig):...|
5632
- |`buildContextFilesMenuChoices`|fn||3971-3998|function buildContextFilesMenuChoices(config: UseReqConfi...|
5633
- |`configureContextFilesMenu`|fn||4009-4067|async function configureContextFilesMenu(|
5634
- |`setFlag`|fn||4014-4018|const setFlag = (flagKey: "context-files-requirements" | ...|
5635
- |`buildPiUsereqMenuChoices`|fn||4077-4182|function buildPiUsereqMenuChoices(|
5636
- |`buildSrcDirMenuChoices`|fn||4191-4209|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
5637
- |`buildSrcDirRemovalChoices`|fn||4218-4230|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
5638
- |`configurePiUsereq`|fn||4241-4499|async function configurePiUsereq(|
5639
- |`persistConfigChange`|fn||4252-4257|const persistConfigChange = () =>|
5640
- |`registerConfigCommands`|fn||4509-4519|function registerConfigCommands(|
5641
- |`piUsereqExtension`|fn||4528-4541|export default function piUsereqExtension(pi: ExtensionAP...|
5548
+ |`PiShortcutRegistrar`|iface||186-194|interface PiShortcutRegistrar|
5549
+ |`getProjectBase`|fn||202-211|function getProjectBase(cwd: string): string|
5550
+ |`getProcessCwdSafe`|fn||218-227|function getProcessCwdSafe(): string|
5551
+ |`resolveLiveBootstrapCwd`|fn||235-247|function resolveLiveBootstrapCwd(cwd: string): string|
5552
+ |`syncContextCwdMirror`|fn||256-265|function syncContextCwdMirror(ctx: { cwd?: string }, cwd:...|
5553
+ |`loadProjectConfig`|fn||274-277|function loadProjectConfig(cwd: string): UseReqConfig|
5554
+ |`DebugToolCommandExecuteResult`|type||283||
5555
+ |`shouldRegisterDebugToolCommands`|fn||292-298|function shouldRegisterDebugToolCommands(cwd: string): bo...|
5556
+ |`writeDebugToolCommandResultToEditor`|fn||309-323|function writeDebugToolCommandResultToEditor(|
5557
+ |`executeDebugToolCommand`|fn||335-353|function executeDebugToolCommand(|
5558
+ |`registerDebugToolCommands`|fn||362-401|function registerDebugToolCommands(pi: ExtensionAPI): void|
5559
+ |`saveProjectConfig`|fn||411-414|function saveProjectConfig(cwd: string, config: UseReqCon...|
5560
+ |`formatLocalConfigPathForMenu`|fn||423-427|function formatLocalConfigPathForMenu(cwd: string): string|
5561
+ |`formatGlobalConfigPathForMenu`|fn||435-437|function formatGlobalConfigPathForMenu(): string|
5562
+ |`buildTerminalSettingsMenuChoices`|fn||446-457|function buildTerminalSettingsMenuChoices(options:|
5563
+ |`ResetConfirmationChange`|iface||463-467|interface ResetConfirmationChange|
5564
+ |`formatResetConfirmationValue`|fn||476-478|function formatResetConfirmationValue(previousValue: stri...|
5565
+ |`buildResetConfirmationChoices`|fn||488-527|function buildResetConfirmationChoices(|
5566
+ |`confirmResetChanges`|fn||539-552|async function confirmResetChanges(|
5567
+ |`writePersistedConfigToEditor`|fn||561-566|function writePersistedConfigToEditor(|
5568
+ |`writePersistedLocalConfigToEditor`|fn||576-582|function writePersistedLocalConfigToEditor(|
5569
+ |`writePersistedGlobalConfigToEditor`|fn||591-595|function writePersistedGlobalConfigToEditor(|
5570
+ |`buildSearchToolSupportedTagGuidelines`|fn||656-660|function buildSearchToolSupportedTagGuidelines(): string[]|
5571
+ |`buildSearchToolSchemaDescription`|fn||668-673|function buildSearchToolSchemaDescription(scope: FindTool...|
5572
+ |`buildSearchToolPromptGuidelines`|fn||681-694|function buildSearchToolPromptGuidelines(scope: FindToolS...|
5573
+ |`MonolithicToolRenderResult`|type||700||
5574
+ |`getMonolithicToolText`|fn||717-720|function getMonolithicToolText(result: MonolithicToolRend...|
5575
+ |`getMonolithicToolErrorText`|fn||728-738|function getMonolithicToolErrorText(result: MonolithicToo...|
5576
+ |`formatCompactToolArgumentValue`|fn||746-785|function formatCompactToolArgumentValue(value: unknown): ...|
5577
+ |`buildCompactToolInvocationText`|fn||793-804|function buildCompactToolInvocationText(args: Record<stri...|
5578
+ |`summarizeStructuredToolResult`|fn||814-829|function summarizeStructuredToolResult(|
5579
+ |`buildStructuredToolRenderResult`|fn||838-857|function buildStructuredToolRenderResult(toolName: string)|
5580
+ |`executeMonolithicTool`|fn||865-871|function executeMonolithicTool(operation: () => ToolResul...|
5581
+ |`executeStatusTool`|fn||880-909|function executeStatusTool(operation: () => ToolResult): ...|
5582
+ |`deliverPromptCommand`|fn||921-970|function deliverPromptCommand(|
5583
+ |`shouldIgnoreLatePromptDeliveryFailure`|fn||981-997|function shouldIgnoreLatePromptDeliveryFailure(|
5584
+ |`logPromptWorkflowStateChange`|fn||1010-1029|function logPromptWorkflowStateChange(|
5585
+ |`logPromptWorkflowEvent`|fn||1045-1065|function logPromptWorkflowEvent(|
5586
+ |`transitionPromptWorkflowState`|fn||1078-1091|function transitionPromptWorkflowState(|
5587
+ |`resolvePromptCommandDescription`|fn||1099-1103|function resolvePromptCommandDescription(|
5588
+ |`resolveDebugProjectBase`|fn||1112-1116|function resolveDebugProjectBase(cwd: string, statusContr...|
5589
+ |`notifyContextSafely`|fn||1127-1144|function notifyContextSafely(|
5590
+ |`rejectNonIdleReqCommand`|fn||1156-1176|function rejectNonIdleReqCommand(|
5591
+ |`getPiUsereqStartupTools`|fn||1185-1193|function getPiUsereqStartupTools(pi: ExtensionAPI): ToolI...|
5592
+ |`getConfiguredEnabledPiUsereqTools`|fn||1201-1205|function getConfiguredEnabledPiUsereqTools(config: UseReq...|
5593
+ |`applyConfiguredPiUsereqTools`|fn||1215-1232|function applyConfiguredPiUsereqTools(pi: ExtensionAPI, c...|
5594
+ |`handleExtensionStatusEvent`|fn||1245-1516|async function handleExtensionStatusEvent(|
5595
+ |`registerExtensionStatusHooks`|fn||1532-1551|function registerExtensionStatusHooks(|
5596
+ |`setConfiguredPiUsereqTools`|fn||1561-1564|function setConfiguredPiUsereqTools(pi: ExtensionAPI, con...|
5597
+ |`getDebugToolToggleNames`|fn||1572-1574|function getDebugToolToggleNames(): PiUsereqStartupToolNa...|
5598
+ |`resetDebugConfigToDefaults`|fn||1583-1592|function resetDebugConfigToDefaults(config: UseReqConfig)...|
5599
+ |`formatDebugMenuSummary`|fn||1600-1606|function formatDebugMenuSummary(config: UseReqConfig): st...|
5600
+ |`buildDebugMenuChoice`|fn||1616-1629|function buildDebugMenuChoice(|
5601
+ |`selectDebugLogOnStatus`|fn||1638-1666|async function selectDebugLogOnStatus(|
5602
+ |`buildDebugMenuChoices`|fn||1675-1761|function buildDebugMenuChoices(config: UseReqConfig): PiU...|
5603
+ |`configureDebugMenu`|fn||1772-1962|async function configureDebugMenu(|
5604
+ |`updateDebugToolCommandsEnabled`|fn||1778-1785|const updateDebugToolCommandsEnabled = (nextValue: unknow...|
5605
+ |`PiNotifyBooleanConfigKey`|type||1968||
5606
+ |`PiNotifyEventBooleanConfigKey`|type||1985||
5607
+ |`PiNotifyEventId`|type||1994||
5608
+ |`PiNotifyEventRowDefinition`|iface||2000-2004|interface PiNotifyEventRowDefinition|
5609
+ |`PiNotifyEventMenuDefinition`|iface||2010-2016|interface PiNotifyEventMenuDefinition|
5610
+ |`togglePiNotifyFlag`|fn||2025-2028|function togglePiNotifyFlag(config: UseReqConfig, key: Pi...|
5611
+ |`resetPiNotifyConfigToDefaults`|fn||2037-2061|function resetPiNotifyConfigToDefaults(config: UseReqConf...|
5612
+ |`formatPiNotifyPushoverPriority`|fn||2070-2072|function formatPiNotifyPushoverPriority(priority: PiNotif...|
5613
+ |`formatPiNotifyEventMenuSummary`|fn||2156-2164|function formatPiNotifyEventMenuSummary(|
5614
+ |`buildPiNotifyEventLauncherChoice`|fn||2174-2184|function buildPiNotifyEventLauncherChoice(|
5615
+ |`buildPiNotifyEventMenuChoices`|fn||2194-2210|function buildPiNotifyEventMenuChoices(|
5616
+ |`resetPiNotifyEventMenuToDefaults`|fn||2220-2228|function resetPiNotifyEventMenuToDefaults(|
5617
+ |`resolvePiNotifyEventLabel`|fn||2238-2245|function resolvePiNotifyEventLabel(|
5618
+ |`configurePiNotifyEventMenu`|fn||2256-2332|async function configurePiNotifyEventMenu(|
5619
+ |`buildPiNotifyPushoverRows`|fn||2341-2391|function buildPiNotifyPushoverRows(config: UseReqConfig):...|
5620
+ |`selectPiNotifyPushoverPriority`|fn||2401-2429|async function selectPiNotifyPushoverPriority(|
5621
+ |`buildPiNotifyMenuChoices`|fn||2438-2496|function buildPiNotifyMenuChoices(config: UseReqConfig): ...|
5622
+ |`selectPiNotifySoundLevel`|fn||2506-2546|async function selectPiNotifySoundLevel(|
5623
+ |`configurePiNotifyMenu`|fn||2556-2842|async function configurePiNotifyMenu(|
5624
+ |`registerPiNotifyShortcut`|fn||2857-2880|function registerPiNotifyShortcut(|
5625
+ |`resolveReqResetPromptRequest`|fn||2888-2914|function resolveReqResetPromptRequest(|
5626
+ |`isWorktreeBacked`|fn||2891-2898|const isWorktreeBacked = (request: PromptCommandExecution...|
5627
+ |`registerReqResetCommand`|fn||2924-2978|function registerReqResetCommand(|
5628
+ |`registerReqReferencesCommand`|fn||2988-3028|function registerReqReferencesCommand(|
5629
+ |`registerPromptCommands`|fn||3038-3159|function registerPromptCommands(|
5630
+ |`registerAgentTools`|fn||3169-3468|function registerAgentTools(pi: ExtensionAPI): void|
5631
+ |`buildPiUsereqToolsMenuChoices`|fn||3513-3538|function buildPiUsereqToolsMenuChoices(pi: ExtensionAPI, ...|
5632
+ |`buildPiUsereqToolToggleChoices`|fn||3548-3562|function buildPiUsereqToolToggleChoices(pi: ExtensionAPI,...|
5633
+ |`configurePiUsereqToolsMenu`|fn||3573-3690|async function configurePiUsereqToolsMenu(|
5634
+ |`getStaticCheckLanguageConfigForMenu`|fn||3699-3704|function getStaticCheckLanguageConfigForMenu(|
5635
+ |`countConfiguredStaticCheckLanguages`|fn||3712-3714|function countConfiguredStaticCheckLanguages(config: UseR...|
5636
+ |`countEnabledStaticCheckLanguages`|fn||3722-3724|function countEnabledStaticCheckLanguages(config: UseReqC...|
5637
+ |`resetStaticCheckConfig`|fn||3733-3735|function resetStaticCheckConfig(config: UseReqConfig): void|
5638
+ |`formatStaticCheckLanguagesSummary`|fn||3743-3745|function formatStaticCheckLanguagesSummary(config: UseReq...|
5639
+ |`buildStaticCheckMenuChoices`|fn||3754-3786|function buildStaticCheckMenuChoices(config: UseReqConfig...|
5640
+ |`buildSupportedStaticCheckLanguageChoices`|fn||3794-3811|function buildSupportedStaticCheckLanguageChoices(config:...|
5641
+ |`buildConfiguredStaticCheckLanguageChoices`|fn||3819-3836|function buildConfiguredStaticCheckLanguageChoices(config...|
5642
+ |`configureStaticCheckMenu`|fn||3846-3992|async function configureStaticCheckMenu(|
5643
+ |`formatContextFilesSummary`|fn||4001-4003|function formatContextFilesSummary(config: UseReqConfig):...|
5644
+ |`buildContextFilesMenuChoices`|fn||4012-4039|function buildContextFilesMenuChoices(config: UseReqConfi...|
5645
+ |`configureContextFilesMenu`|fn||4050-4108|async function configureContextFilesMenu(|
5646
+ |`setFlag`|fn||4055-4059|const setFlag = (flagKey: "context-files-requirements" | ...|
5647
+ |`buildPiUsereqMenuChoices`|fn||4118-4223|function buildPiUsereqMenuChoices(|
5648
+ |`buildSrcDirMenuChoices`|fn||4232-4250|function buildSrcDirMenuChoices(config: UseReqConfig): Pi...|
5649
+ |`buildSrcDirRemovalChoices`|fn||4259-4271|function buildSrcDirRemovalChoices(config: UseReqConfig):...|
5650
+ |`configurePiUsereq`|fn||4282-4540|async function configurePiUsereq(|
5651
+ |`persistConfigChange`|fn||4293-4298|const persistConfigChange = () =>|
5652
+ |`registerConfigCommands`|fn||4550-4560|function registerConfigCommands(|
5653
+ |`piUsereqExtension`|fn||4569-4582|export default function piUsereqExtension(pi: ExtensionAP...|
5642
5654