pi-usereq 0.37.0 → 0.39.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.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  title: "PI-useReq Requirements"
3
3
  description: Software requirements specification
4
- version: "0.0.68"
5
- date: "2026-05-29"
4
+ version: "0.0.70"
5
+ date: "2026-07-09"
6
6
  author: "OpenAI Codex"
7
7
  scope:
8
8
  paths:
@@ -222,8 +222,8 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
222
222
  - **REQ-186**: MUST substitute `%%PROMT%%`, `%%BASE%%`, `%%TIME%%`, `%%ARGS%%`, and `%%RESULT%%` at runtime inside `Pushover title` and `Pushover text`.
223
223
  - **REQ-187**: MUST render `%%BASE%%` as static `base-path` relative to user home using `~/...` form and `%%TIME%%` as final elapsed `M:SS`.
224
224
  - **REQ-188**: MUST label notification-event rows as `Prompt completed`, `Prompt interrupted`, and `Prompt failed`.
225
- - **REQ-190**: MUST label top-level rows as `Document directory`, `Source-code directories`, `Unit tests directory`, `Auto git commit`, `Git worktree`, `Worktree prefix`, `Language static code checkers`, `Enable tools`, `Notifications`, `Debug`, `Show local configuration`, and `Show global configuration`.
226
- - **REQ-191**: MUST order top-level rows as `Document directory`, `Source-code directories`, `Unit tests directory`, `Auto git commit`, `Git worktree`, `Worktree prefix`, `Language static code checkers`, `Enable tools`, `Notifications`, and `Debug`.
225
+ - **REQ-190**: MUST label top-level rows as `Document directory`, `Source-code directories`, `Unit tests directory`, `Context Files`, `Auto git commit`, `Git worktree`, `Worktree prefix`, `Language static code checkers`, `Enable tools`, `Notifications`, `Debug`, `Show local configuration`, and `Show global configuration`.
226
+ - **REQ-191**: MUST order top-level rows as `Document directory`, `Source-code directories`, `Unit tests directory`, `Context Files`, `Auto git commit`, `Git worktree`, `Worktree prefix`, `Language static code checkers`, `Enable tools`, `Notifications`, and `Debug`.
227
227
  - **REQ-320**: MUST order `Show local configuration` after `Debug`, `Show global configuration` after `Show local configuration`, and `Reset defaults` last.
228
228
  - **REQ-192**: MUST preserve the selected settings-menu row after toggling or editing a setting value.
229
229
  - **REQ-193**: MUST append `Reset defaults` as a final row without right-aligned value text in every configuration menu and descendant selector menu, and MUST NOT render `Save and close`.
@@ -388,11 +388,19 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
388
388
  - **REQ-323**: MUST register `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` only when `DEBUG_TOOL_COMMANDS_ENABLED=enable`.
389
389
  - **REQ-324**: MUST make `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` reuse the `compress`, `references`, `static-check`, `summarize`, and `tokens` runner outputs and write `content[0].text` to the editor.
390
390
  - **REQ-325**: MUST reject `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` execution when `DEBUG_TOOL_COMMANDS_ENABLED=disable`.
391
+ - **REQ-326**: MUST add a top-level `Context Files` row to the `pi-usereq` menu between `Unit tests directory` and `Auto git commit`.
392
+ - **REQ-327**: MUST expose a `Context Files` submenu with separate enable toggles for `REQUIREMENTS.md`, `REFERENCES.md`, and `WORKFLOW.md` in that order.
393
+ - **REQ-328**: MUST persist `context-files-requirements`, `context-files-references`, and `context-files-workflow` as boolean flags in local configuration, each defaulting to enabled.
394
+ - **REQ-329**: MUST replace the `%%CONTEXT_FILES%%` prompt token with one markdown section per enabled context file in the order `REQUIREMENTS.md`, `REFERENCES.md`, `WORKFLOW.md`.
395
+ - **REQ-330**: MUST render each `%%CONTEXT_FILES%%` section as the 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.
396
+ - **REQ-331**: MUST omit the `%%CONTEXT_FILES%%` section for any disabled flag or missing context file without surfacing an error.
397
+ - **REQ-332**: MUST inject `%%CONTEXT_FILES%%` content verbatim after every other prompt replacement so literal `%%...%%` tokens inside context files are not substituted.
398
+ - **REQ-333**: MUST restore all three `Context Files` flags to enabled when the `Context Files` subtree `Reset defaults` is approved.
391
399
 
392
400
  ## 4. Test Requirements
393
401
  - **TST-001**: MUST verify extension activation registers every documented prompt command, agent tool, and configuration command while omitting tool-name slash commands, `test-static-check`, and the removed standalone config-viewer command.
394
402
  - **TST-002**: MUST verify installed bundled prompt, commit-instruction, template, and guideline resources remain readable from `installation-path`.
395
- - **TST-060**: MUST verify prompt rendering replaces `%%PROMPT%%` and expands `%%COMMIT%%` from rendered `git_commit.md` or `git_read-only.md` according to `AUTO_GIT_COMMIT`.
403
+ - **TST-060**: MUST verify prompt rendering replaces `%%PROMPT%%` and expands `%%COMMIT%%` from rendered `git_commit.md` or `git_read-only.md` according to `AUTO_GIT_COMMIT`, excluding the verbatim `%%CONTEXT_FILES%%` block from placeholder-absence assertions.
396
404
  - **TST-003**: MUST verify standalone `files-tokens` outputs match the Python oracle, `--test-static-check` dummy or command outputs match archived fixtures, and `files-summarize`, `files-compress`, plus `files-find` preserve leading source tabs.
397
405
  - **TST-004**: MUST verify project `tokens` outputs match the Python oracle, verify `files-static-check` plus `static-check` against archived fixtures, and verify `summarize`, `compress`, plus `find` preserve leading source tabs.
398
406
  - **TST-005**: MUST verify the configuration menu saves `docs-dir` locally and `AUTO_GIT_COMMIT`, `GIT_WORKTREE_ENABLED`, plus `GIT_WORKTREE_PREFIX` globally immediately after each change.
@@ -504,6 +512,10 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
504
512
  - **TST-114**: MUST verify the `Debug` submenu persists `DEBUG_TOOL_COMMANDS_ENABLED` through immediate-save, reset, and focus-preserving re-render flows.
505
513
  - **TST-115**: MUST verify extension activation registers `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` only when `DEBUG_TOOL_COMMANDS_ENABLED=enable`.
506
514
  - **TST-116**: MUST verify `debug-compress`, `debug-references`, `debug-static-check`, `debug-summarize`, and `debug-tokens` write the same `content[0].text` as `compress`, `references`, `static-check`, `summarize`, and `tokens`, and reject execution when disabled.
515
+ - **TST-117**: MUST verify the `pi-usereq` menu renders `Context Files` between `Unit tests directory` and `Auto git commit`.
516
+ - **TST-118**: MUST verify the `Context Files` submenu persists the three context-file flags in local configuration with immediate-save, reset, and focus-preserving re-render behavior.
517
+ - **TST-119**: MUST verify `%%CONTEXT_FILES%%` replacement emits one section per enabled existing file in the documented order and omits disabled or missing files.
518
+ - **TST-120**: MUST verify `%%CONTEXT_FILES%%` sections use the file-name heading, the pre-substituted HTML file reference, and four-backtick `markdown` fences around raw content.
507
519
 
508
520
  ## 5. Observed Component Model
509
521
 
@@ -573,11 +573,12 @@
573
573
  - `runCapture(...)`: run git add, commit, and status subprocesses [`src/core/req-references-command.ts`]
574
574
  - `listResidualGitStatusLines(...)`: confirm no residual git-status rows remain after commit [`src/core/req-references-command.ts`]
575
575
  - `buildIgnoredGitStatusPaths(...)`: ignore extension-owned debug-log artifacts during cleanliness verification [`src/core/req-references-command.ts`]
576
- - `renderPrompt(...)`: render prompt-command payloads with bundled commit-instruction expansion plus conditional pi.dev governance guidance [`src/core/prompts.ts`]
576
+ - `renderPrompt(...)`: render prompt-command payloads with bundled commit-instruction expansion, conditional pi.dev governance guidance, and `%%CONTEXT_FILES%%` context-file injection [`src/core/prompts.ts`]
577
+ - `buildContextFilesBlock(...)`: build the markdown block injected at `%%CONTEXT_FILES%%` from enabled context files in documented order with pre-substituted `%%DOC_PATH%%` file references and four-backtick fences [`src/core/prompts.ts`]
577
578
  - `deliverPromptCommand(...)`: dispatch prompt replay into the current recorded session [`src/index.ts`]
578
579
  - External boundaries: `RecordingExtensionAPI.sendUserMessage(...)` records the delivered prompt payload.
579
580
  - `configurePiUsereq(...)`: execute the interactive configuration menu [`src/index.ts`]
580
- - `buildPiUsereqMenuChoices(...)`: serialize top-level settings actions including effective worktree locking plus display-only local and global config-path rows [`src/index.ts`]
581
+ - `buildPiUsereqMenuChoices(...)`: serialize top-level settings actions including the `Context Files` injection toggle row, effective worktree locking, plus display-only local and global config-path rows [`src/index.ts`]
581
582
  - `formatLocalConfigPathForMenu(...)`: format the current local config path with the shared `~`-relative path formatter for menu display [`src/index.ts`]
582
583
  - `formatGlobalConfigPathForMenu(...)`: format the current global config path with the shared `~`-relative path formatter for menu display [`src/index.ts`]
583
584
  - `showPiUsereqSettingsMenu(...)`: render the shared settings-menu UI for top-level and submenu actions, keeping inline toggle rows open while rebuilding dependent rows in place [`src/core/settings-menu.ts`]
@@ -617,6 +618,9 @@
617
618
  - `resolvePiNotifyEventLabel(...)`: map one event-toggle key to the human-readable menu label [`src/index.ts`]
618
619
  - `togglePiNotifyFlag(...)`: toggle one persisted boolean notification setting [`src/index.ts`]
619
620
  - `togglePiNotifyFlag(...)`: toggle one persisted boolean notification setting [`src/index.ts`]
621
+ - `configureContextFilesMenu(...)`: interactive `Context Files` editor with inline `on|off` toggles for `REQUIREMENTS.md`, `REFERENCES.md`, and `WORKFLOW.md` plus subtree reset to all-enabled defaults [`src/index.ts`]
622
+ - `buildContextFilesMenuChoices(...)`: serialize the three context-file toggle rows plus the subtree reset terminal row [`src/index.ts`]
623
+ - `showPiUsereqSettingsMenu(...)`: render the shared settings-menu UI for inline context-file toggles and reset confirmation [`src/core/settings-menu.ts`]
620
624
  - `replayTool(...)`: replay a recorded tool execute handler and capture content/details [`scripts/lib/extension-debug-harness.ts`]
621
625
  - `registerExtensionOffline(...)`: rebuild the recorded extension registration surface [`scripts/lib/extension-debug-harness.ts`]
622
626
  - `RecordingCommandContext(...)`: initialize the recorded command-context UI adapter and deterministic theme-color encoding [`scripts/lib/recording-extension-api.ts`]
@@ -841,7 +845,7 @@
841
845
  - `cleanupPromptWorktreeCreation(...)`: rollback partial prompt-command worktree resources on verification or finalization failure [`src/core/prompt-command-runtime.ts`]
842
846
  - `promptWorktreeRegistered(...)`: test whether the sibling worktree remains registered [`src/core/prompt-command-runtime.ts`]
843
847
  - `createPromptExecutionSessionFile(...)`: fork the current persisted session into the worktree cwd when the origin session file already exists, or materialize an execution-session snapshot with header cwd=`worktree-path` plus the current in-memory branch when the origin session is not flushed yet [`src/core/prompt-command-runtime.ts`]
844
- - `renderPrompt(...)`: render prompt template with project substitutions, bundled commit-instruction expansion, extension-owned runtime guidance, and conditional pi.dev governance guidance [`src/core/prompts.ts`]
848
+ - `renderPrompt(...)`: render prompt template with project substitutions, bundled commit-instruction expansion, extension-owned runtime guidance, conditional pi.dev governance guidance, and `%%CONTEXT_FILES%%` context-file injection [`src/core/prompts.ts`]
845
849
  - `readBundledPrompt(...)`: read bundled prompt template [`src/core/resources.ts`]
846
850
  - `ensureBundledResourcesAccessible(...)`: validate installation-owned bundled resources [`src/core/resources.ts`]
847
851
  - `getBundledResourceRoot(...)`: resolve installation-owned resource root [`src/core/resources.ts`]
@@ -867,6 +871,7 @@
867
871
  - `injectPiDevConformanceBlock(...)`: add conditional pi.dev governance guidance for read-only docs, interface-contract review, and pi client validation [`src/core/prompts.ts`]
868
872
  - `buildPiDevConformanceBlock(...)`: resolve manifest-gated pi.dev governance rules for read-only docs, interface contracts, and pi client validation [`src/core/prompts.ts`]
869
873
  - `adaptPromptForInternalTools(...)`: rewrite tool names for internal wrappers [`src/core/prompts.ts`]
874
+ - `buildContextFilesBlock(...)`: build the markdown block injected at `%%CONTEXT_FILES%%` from enabled context files in documented order with pre-substituted `%%DOC_PATH%%` file references and four-backtick fences [`src/core/prompts.ts`]
870
875
  - `activatePromptCommandExecution(...)`: switch to the verified execution session through replacement-session-aware `ctx.switchSession(sessionPath, { withSession })` handling, reuse the persisted replacement-session context when later lifecycle hooks omit `switchSession()`, carry forward the returned replacement-session context for later session-bound work, re-align `process.cwd()` to the execution path, confirm `process.cwd()` plus the persisted execution-session file header cwd when the file is already persisted (treating a not-yet-flushed session file as a non-fatal lazy-persistence state because pi writes session files on first assistant flush), and store the verified runtime path plus reusable command-context state used by later tool execution and prompt-end handling [`src/core/prompt-command-runtime.ts`]
871
876
  - `resolvePromptCommandSwitchContext(...)`: prefer the live command context or fall back to the persisted replacement-session context keyed by the execution-session file [`src/core/prompt-command-runtime.ts`]
872
877
  - `switchPromptCommandSession(...)`: perform the session switch, tolerate the documented stale-extension-context side effect from invalidating the old closure, and let later verification prove whether the target session actually became active [`src/core/prompt-command-runtime.ts`]
@@ -1116,7 +1121,7 @@
1116
1121
  - `formatPiNotifyBasePath(...)`: render `%%BASE%%` as `~`-relative when possible [`src/core/pi-notify.ts`]
1117
1122
  - `formatPiNotifyDuration(...)`: render `%%TIME%%` as `M:SS` [`src/core/pi-notify.ts`]
1118
1123
  - `formatPiNotifyResult(...)`: map prompt-end outcomes to `successed|aborted|failed` [`src/core/pi-notify.ts`]
1119
- - `configurePiUsereq(...)`: interactive configuration menu runtime root for directories, `Auto git commit`, locked-or-editable worktree rows, tools, notifications, and debug settings [`src/index.ts`]
1124
+ - `configurePiUsereq(...)`: interactive configuration menu runtime root for directories, `Context Files` injection toggles, `Auto git commit`, locked-or-editable worktree rows, tools, notifications, and debug settings [`src/index.ts`]
1120
1125
  - `loadProjectConfig(...)`: load config and normalize persisted directory paths for command context [`src/index.ts`]
1121
1126
  - `getProjectBase(...)`: resolve project base from command context cwd [`src/index.ts`]
1122
1127
  - `loadConfig(...)`: load config or defaults [`src/core/config.ts`]
@@ -1128,7 +1133,7 @@
1128
1133
  - `resolveGitRoot(...)`: resolve repository root [`src/core/tool-runner.ts`]
1129
1134
  - `runCapture(...)`: run git subprocess [`src/core/tool-runner.ts`]
1130
1135
  - `getProjectBase(...)`: resolve project base from command context cwd [`src/index.ts`]
1131
- - `buildPiUsereqMenuChoices(...)`: serialize top-level settings actions including effective worktree locking, notification and debug summaries, display-only local and global config-path rows, and reset-only terminal rows [`src/index.ts`]
1136
+ - `buildPiUsereqMenuChoices(...)`: serialize top-level settings actions including the `Context Files` injection toggle row, effective worktree locking, notification and debug summaries, display-only local and global config-path rows, and reset-only terminal rows [`src/index.ts`]
1132
1137
  - `formatDebugMenuSummary(...)`: summarize global debug mode plus selected tool and prompt counts [`src/index.ts`]
1133
1138
  - `formatLocalConfigPathForMenu(...)`: format the current local config path with the shared `~`-relative path formatter for menu display [`src/index.ts`]
1134
1139
  - `formatGlobalConfigPathForMenu(...)`: format the current global config path with the shared `~`-relative path formatter for menu display [`src/index.ts`]
@@ -1230,6 +1235,10 @@
1230
1235
  - `selectPiNotifyPushoverPriority(...)`: present the `Normal|High` priority selector with the subtree-local reset action [`src/index.ts`]
1231
1236
  - `buildTerminalSettingsMenuChoices(...)`: append the canonical value-less `Reset defaults` row to the selector menu [`src/index.ts`]
1232
1237
  - `resetPiNotifyConfigToDefaults(...)`: restore notification settings to documented defaults [`src/index.ts`]
1238
+ - `configureContextFilesMenu(...)`: interactive `Context Files` editor with inline `on|off` toggles for `REQUIREMENTS.md`, `REFERENCES.md`, and `WORKFLOW.md` plus subtree reset to all-enabled defaults [`src/index.ts`]
1239
+ - `buildContextFilesMenuChoices(...)`: serialize the three context-file toggle rows plus the subtree reset terminal row [`src/index.ts`]
1240
+ - `showPiUsereqSettingsMenu(...)`: render the shared settings-menu UI for inline context-file toggles and reset confirmation [`src/core/settings-menu.ts`]
1241
+ - `confirmResetChanges(...)`: require explicit approval before applying the Context Files subtree reset [`src/index.ts`]
1233
1242
  - `getDefaultConfig(...)`: restore default config on reset and subtree-local selector resets [`src/core/config.ts`]
1234
1243
  - `normalizeEnabledPiUsereqTools(...)`: canonicalize configurable active tools [`src/core/pi-usereq-tools.ts`]
1235
1244
  - `applyConfiguredPiUsereqTools(...)`: re-apply active tools after reset [`src/index.ts`]
@@ -84,6 +84,9 @@ export interface UseReqConfig {
84
84
  "docs-dir": string;
85
85
  "tests-dir": string;
86
86
  "src-dir": string[];
87
+ "context-files-requirements": boolean;
88
+ "context-files-references": boolean;
89
+ "context-files-workflow": boolean;
87
90
  "static-check": Record<string, StaticCheckLanguageConfig>;
88
91
  "enabled-tools": string[];
89
92
  AUTO_GIT_COMMIT: "enable" | "disable";
@@ -145,6 +148,9 @@ interface UseReqLocalConfig {
145
148
  "docs-dir": string;
146
149
  "tests-dir": string;
147
150
  "src-dir": string[];
151
+ "context-files-requirements": boolean;
152
+ "context-files-references": boolean;
153
+ "context-files-workflow": boolean;
148
154
  "static-check": Record<string, LocalStaticCheckLanguageConfig>;
149
155
  DEBUG_ENABLED: "enable" | "disable";
150
156
  DEBUG_LOG_FILE: string;
@@ -206,6 +212,23 @@ export const DEFAULT_TESTS_DIR = "tests";
206
212
  * @details The array seeds newly created configs and repairs invalid persisted source selections. Access complexity is O(1).
207
213
  */
208
214
  export const DEFAULT_SRC_DIRS = ["src"];
215
+ /**
216
+ * @brief Defines the default value for every persisted context-file injection flag.
217
+ * @details Each `%%CONTEXT_FILES%%` injection toggle defaults to enabled so the bundled canonical documents remain part of the prompt context unless the user explicitly disables one. Lookup complexity is O(1).
218
+ * @satisfies REQ-328
219
+ */
220
+ export const DEFAULT_CONTEXT_FILES_FLAG = true;
221
+
222
+ /**
223
+ * @brief Normalizes one persisted context-file injection flag.
224
+ * @details Returns the documented default (`true`) for missing or non-boolean values and preserves only explicit boolean input, so any malformed persisted entry keeps context-file injection enabled. Runtime is O(1). No external state is mutated.
225
+ * @param[in] value {unknown} Candidate persisted context-file flag.
226
+ * @return {boolean} Normalized context-file injection flag.
227
+ * @satisfies REQ-328
228
+ */
229
+ export function normalizeContextFilesFlag(value: unknown): boolean {
230
+ return typeof value === "boolean" ? value : DEFAULT_CONTEXT_FILES_FLAG;
231
+ }
209
232
  /**
210
233
  * @brief Defines the canonical supported static-check language order used by default config serialization.
211
234
  * @details The array lists every supported user-configurable language exactly once so default config builders and config serializers can emit deterministic per-language records. Access complexity is O(1).
@@ -555,7 +578,7 @@ export function getGlobalConfigPath(): string {
555
578
  * @details Populates canonical docs/test/source directories, derives local static-check enable defaults from the supplied global checker definitions, and seeds documented debug defaults including tool-wrapper command registration without any cross-project fields. Runtime is O(l). No filesystem side effects occur.
556
579
  * @param[in] globalStaticCheckConfig {Record<string, GlobalStaticCheckLanguageConfig>} Global checker definitions used to derive local enable defaults.
557
580
  * @return {UseReqLocalConfig} Fresh default local configuration object.
558
- * @satisfies CTN-019
581
+ * @satisfies CTN-019, REQ-328
559
582
  */
560
583
  function getDefaultLocalConfig(
561
584
  globalStaticCheckConfig: Record<string, GlobalStaticCheckLanguageConfig>,
@@ -564,6 +587,9 @@ function getDefaultLocalConfig(
564
587
  "docs-dir": DEFAULT_DOCS_DIR,
565
588
  "tests-dir": DEFAULT_TESTS_DIR,
566
589
  "src-dir": [...DEFAULT_SRC_DIRS],
590
+ "context-files-requirements": DEFAULT_CONTEXT_FILES_FLAG,
591
+ "context-files-references": DEFAULT_CONTEXT_FILES_FLAG,
592
+ "context-files-workflow": DEFAULT_CONTEXT_FILES_FLAG,
567
593
  "static-check": getDefaultLocalStaticCheckConfig(globalStaticCheckConfig),
568
594
  DEBUG_ENABLED: DEFAULT_DEBUG_ENABLED,
569
595
  DEBUG_LOG_FILE: DEFAULT_DEBUG_LOG_FILE,
@@ -619,6 +645,7 @@ function getDefaultGlobalConfig(): UseReqGlobalConfig {
619
645
  * @param[in] localConfig {UseReqLocalConfig} Persisted local configuration.
620
646
  * @param[in] globalConfig {UseReqGlobalConfig} Persisted global configuration.
621
647
  * @return {UseReqConfig} Effective merged configuration.
648
+ * @satisfies REQ-328
622
649
  */
623
650
  function mergeConfigScopes(
624
651
  localConfig: UseReqLocalConfig,
@@ -645,6 +672,9 @@ function mergeConfigScopes(
645
672
  "docs-dir": docsDir,
646
673
  "tests-dir": testsDir,
647
674
  "src-dir": srcDir.length > 0 ? srcDir : [...DEFAULT_SRC_DIRS],
675
+ "context-files-requirements": localConfig["context-files-requirements"],
676
+ "context-files-references": localConfig["context-files-references"],
677
+ "context-files-workflow": localConfig["context-files-workflow"],
648
678
  "static-check": mergeStaticCheckConfig(localConfig["static-check"], globalConfig["static-check"]),
649
679
  "enabled-tools": normalizeEnabledPiUsereqTools(globalConfig["enabled-tools"]),
650
680
  AUTO_GIT_COMMIT: autoGitCommit,
@@ -823,7 +853,7 @@ function normalizeGlobalStaticCheckConfig(
823
853
  * @param[in] projectBase {string} Absolute project root path.
824
854
  * @param[in] defaultStaticCheckConfig {Record<string, LocalStaticCheckLanguageConfig>} Local static-check enable defaults derived from the current global checker map.
825
855
  * @return {UseReqLocalConfig} Sanitized local configuration.
826
- * @satisfies CTN-019
856
+ * @satisfies CTN-019, REQ-328
827
857
  */
828
858
  function loadLocalConfig(
829
859
  projectBase: string,
@@ -836,6 +866,9 @@ function loadLocalConfig(
836
866
  "docs-dir": DEFAULT_DOCS_DIR,
837
867
  "tests-dir": DEFAULT_TESTS_DIR,
838
868
  "src-dir": [...DEFAULT_SRC_DIRS],
869
+ "context-files-requirements": DEFAULT_CONTEXT_FILES_FLAG,
870
+ "context-files-references": DEFAULT_CONTEXT_FILES_FLAG,
871
+ "context-files-workflow": DEFAULT_CONTEXT_FILES_FLAG,
839
872
  "static-check": normalizeLocalStaticCheckConfig(undefined, defaultStaticCheckConfig),
840
873
  DEBUG_ENABLED: DEFAULT_DEBUG_ENABLED,
841
874
  DEBUG_LOG_FILE: DEFAULT_DEBUG_LOG_FILE,
@@ -863,6 +896,9 @@ function loadLocalConfig(
863
896
  "docs-dir": docsDirCandidate || DEFAULT_DOCS_DIR,
864
897
  "tests-dir": testsDirCandidate || DEFAULT_TESTS_DIR,
865
898
  "src-dir": srcDirCandidate.length > 0 ? srcDirCandidate : [...DEFAULT_SRC_DIRS],
899
+ "context-files-requirements": normalizeContextFilesFlag(data["context-files-requirements"]),
900
+ "context-files-references": normalizeContextFilesFlag(data["context-files-references"]),
901
+ "context-files-workflow": normalizeContextFilesFlag(data["context-files-workflow"]),
866
902
  "static-check": normalizeLocalStaticCheckConfig(data["static-check"], defaultStaticCheckConfig),
867
903
  DEBUG_ENABLED: normalizeDebugEnabled(data.DEBUG_ENABLED),
868
904
  DEBUG_LOG_FILE: normalizeDebugLogFile(data.DEBUG_LOG_FILE),
@@ -945,7 +981,7 @@ export function loadConfig(projectBase: string): UseReqConfig {
945
981
  * @details Copies only project-scoped keys into a fresh object so runtime-derived metadata plus global checker, tool, git, and notification fields never reach `.pi-usereq.json`, while preserving the debug tool-wrapper command flag beside other local debug settings. Runtime is O(n) in config size. No external state is mutated.
946
982
  * @param[in] config {UseReqConfig} Effective configuration object.
947
983
  * @return {UseReqLocalConfig} Persistable local configuration payload.
948
- * @satisfies CTN-012, CTN-013, CTN-019, REQ-104, REQ-146, REQ-249, REQ-316, REQ-277
984
+ * @satisfies CTN-012, CTN-013, CTN-019, REQ-104, REQ-146, REQ-249, REQ-316, REQ-277, REQ-328
949
985
  */
950
986
  function buildPersistedLocalConfig(config: UseReqConfig): UseReqLocalConfig {
951
987
  const normalizedSrcDir = config["src-dir"]
@@ -955,6 +991,9 @@ function buildPersistedLocalConfig(config: UseReqConfig): UseReqLocalConfig {
955
991
  "docs-dir": normalizeRelativeDirContract(config["docs-dir"]) || DEFAULT_DOCS_DIR,
956
992
  "tests-dir": normalizeRelativeDirContract(config["tests-dir"]) || DEFAULT_TESTS_DIR,
957
993
  "src-dir": normalizedSrcDir.length > 0 ? normalizedSrcDir : [...DEFAULT_SRC_DIRS],
994
+ "context-files-requirements": normalizeContextFilesFlag(config["context-files-requirements"]),
995
+ "context-files-references": normalizeContextFilesFlag(config["context-files-references"]),
996
+ "context-files-workflow": normalizeContextFilesFlag(config["context-files-workflow"]),
958
997
  "static-check": Object.fromEntries(
959
998
  Object.entries(config["static-check"]).map(([language, languageConfig]) => [
960
999
  language,
@@ -6,8 +6,8 @@
6
6
 
7
7
  import fs from "node:fs";
8
8
  import path from "node:path";
9
- import { buildPromptReplacementPaths, type UseReqConfig } from "./config.js";
10
- import { formatRuntimePathForDisplay } from "./path-context.js";
9
+ import { buildPromptReplacementPaths, DEFAULT_DOCS_DIR, type UseReqConfig } from "./config.js";
10
+ import { formatRuntimePathForDisplay, normalizeRelativeDirContract } from "./path-context.js";
11
11
  import type {
12
12
  PromptCommandExecutionPlan,
13
13
  PromptCommandName,
@@ -135,6 +135,44 @@ function injectPiDevConformanceBlock(text: string, promptName: string, projectBa
135
135
  return text.replace(behaviorHeading, `${behaviorHeading}${block}\n`);
136
136
  }
137
137
 
138
+ /**
139
+ * @brief Defines the ordered context-file injection descriptors used by `%%CONTEXT_FILES%%`.
140
+ * @details Each entry binds the configured flag key to its canonical document file name so the renderer can iterate the documented `REQUIREMENTS.md`, `REFERENCES.md`, `WORKFLOW.md` order in one stable vector. Lookup complexity is O(1).
141
+ * @satisfies REQ-329
142
+ */
143
+ const CONTEXT_FILE_DESCRIPTORS: ReadonlyArray<{ flagKey: "context-files-requirements" | "context-files-references" | "context-files-workflow"; fileName: string }> = [
144
+ { flagKey: "context-files-requirements", fileName: "REQUIREMENTS.md" },
145
+ { flagKey: "context-files-references", fileName: "REFERENCES.md" },
146
+ { flagKey: "context-files-workflow", fileName: "WORKFLOW.md" },
147
+ ];
148
+
149
+ /**
150
+ * @brief Builds the markdown block that replaces the `%%CONTEXT_FILES%%` prompt token.
151
+ * @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.
152
+ * @param[in] projectBase {string} Absolute project root used to resolve the configured docs directory.
153
+ * @param[in] config {UseReqConfig} Effective project configuration supplying the docs directory and context-file flags.
154
+ * @return {string} Rendered markdown block, or the empty string when no enabled context file exists.
155
+ * @satisfies REQ-329, REQ-330, REQ-331, REQ-332
156
+ */
157
+ function buildContextFilesBlock(projectBase: string, config: UseReqConfig): string {
158
+ const normalizedDocsDir = normalizeRelativeDirContract(config["docs-dir"]) || DEFAULT_DOCS_DIR;
159
+ const sections: string[] = [];
160
+ for (const { flagKey, fileName } of CONTEXT_FILE_DESCRIPTORS) {
161
+ if (!config[flagKey]) {
162
+ continue;
163
+ }
164
+ const filePath = path.join(projectBase, normalizedDocsDir, fileName);
165
+ if (!fs.existsSync(filePath) || !fs.statSync(filePath).isFile()) {
166
+ continue;
167
+ }
168
+ const content = fs.readFileSync(filePath, "utf8");
169
+ sections.push(
170
+ `### ${fileName}\n\n<file name="${normalizedDocsDir}/${fileName}">\n\`\`\`\`markdown\n${content}\n\`\`\`\``,
171
+ );
172
+ }
173
+ return sections.join("\n\n");
174
+ }
175
+
138
176
  /**
139
177
  * @brief Rewrites bundled prompt tool references from legacy `req --...` syntax to internal tool names.
140
178
  * @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.
@@ -278,7 +316,7 @@ function renderBundledCommitInstruction(
278
316
  * @param[in] config {UseReqConfig} Effective project configuration used for path substitutions.
279
317
  * @param[in] executionPlan {PromptCommandExecutionPlan | undefined} Optional prompt-command execution plan used for injected runtime guidance.
280
318
  * @return {string} Fully rendered prompt markdown ready for `pi.sendUserMessage(...)`.
281
- * @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
319
+ * @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
282
320
  */
283
321
  export function renderPrompt(
284
322
  promptName: string,
@@ -310,5 +348,10 @@ export function renderPrompt(
310
348
  promptName,
311
349
  projectBase,
312
350
  );
313
- return adaptPromptForInternalTools(withPiDevConformance);
351
+ const adapted = adaptPromptForInternalTools(withPiDevConformance);
352
+ const contextFilesBlock = buildContextFilesBlock(projectBase, config);
353
+ if (contextFilesBlock) {
354
+ return adapted.split("%%CONTEXT_FILES%%").join(contextFilesBlock);
355
+ }
356
+ return adapted.split("%%CONTEXT_FILES%%").join("");
314
357
  }
package/src/index.ts CHANGED
@@ -27,6 +27,7 @@ import {
27
27
  } from "./core/agent-tool-json.js";
28
28
  import type { FindToolScope } from "./core/find-payload.js";
29
29
  import {
30
+ DEFAULT_CONTEXT_FILES_FLAG,
30
31
  DEFAULT_GIT_WORKTREE_PREFIX,
31
32
  DEFAULT_SRC_DIRS,
32
33
  createStaticCheckLanguageConfig,
@@ -3949,13 +3950,129 @@ async function configureStaticCheckMenu(
3949
3950
  }
3950
3951
  }
3951
3952
 
3953
+ /**
3954
+ * @brief Summarizes the `Context Files` flag state for the top-level menu value column.
3955
+ * @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.
3956
+ * @param[in] config {UseReqConfig} Effective project configuration.
3957
+ * @return {string} Compact `Context Files` summary string.
3958
+ * @satisfies REQ-327
3959
+ */
3960
+ function formatContextFilesSummary(config: UseReqConfig): string {
3961
+ return `requirements:${config["context-files-requirements"] ? "on" : "off"} \u2022 references:${config["context-files-references"] ? "on" : "off"} \u2022 workflow:${config["context-files-workflow"] ? "on" : "off"}`;
3962
+ }
3963
+
3964
+ /**
3965
+ * @brief Builds the shared settings-menu choices for the `Context Files` submenu.
3966
+ * @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.
3967
+ * @param[in] config {UseReqConfig} Effective project configuration.
3968
+ * @return {PiUsereqSettingsMenuChoice[]} Ordered `Context Files` submenu choices.
3969
+ * @satisfies REQ-327, REQ-328, REQ-333
3970
+ */
3971
+ function buildContextFilesMenuChoices(config: UseReqConfig): PiUsereqSettingsMenuChoice[] {
3972
+ return [
3973
+ {
3974
+ id: "context-files-requirements",
3975
+ label: "REQUIREMENTS.md",
3976
+ value: config["context-files-requirements"] ? "on" : "off",
3977
+ values: ["on", "off"],
3978
+ description: "Toggle injection of REQUIREMENTS.md into the prompt context through `%%CONTEXT_FILES%%`.",
3979
+ },
3980
+ {
3981
+ id: "context-files-references",
3982
+ label: "REFERENCES.md",
3983
+ value: config["context-files-references"] ? "on" : "off",
3984
+ values: ["on", "off"],
3985
+ description: "Toggle injection of REFERENCES.md into the prompt context through `%%CONTEXT_FILES%%`.",
3986
+ },
3987
+ {
3988
+ id: "context-files-workflow",
3989
+ label: "WORKFLOW.md",
3990
+ value: config["context-files-workflow"] ? "on" : "off",
3991
+ values: ["on", "off"],
3992
+ description: "Toggle injection of WORKFLOW.md into the prompt context through `%%CONTEXT_FILES%%`.",
3993
+ },
3994
+ ...buildTerminalSettingsMenuChoices({
3995
+ resetDefaultsDescription: "Restore the default Context Files configuration (all three files enabled).",
3996
+ }),
3997
+ ];
3998
+ }
3999
+
4000
+ /**
4001
+ * @brief Runs the `Context Files` configuration submenu.
4002
+ * @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.
4003
+ * @param[in] ctx {ExtensionCommandContext} Active command context.
4004
+ * @param[in,out] config {UseReqConfig} Mutable effective project configuration.
4005
+ * @param[in] onConfigChange {() => void} Shared persistence-plus-status callback.
4006
+ * @return {Promise<void>} Promise resolved when the submenu closes.
4007
+ * @satisfies REQ-327, REQ-328, REQ-333
4008
+ */
4009
+ async function configureContextFilesMenu(
4010
+ ctx: ExtensionCommandContext,
4011
+ config: UseReqConfig,
4012
+ onConfigChange: () => void,
4013
+ ): Promise<void> {
4014
+ const setFlag = (flagKey: "context-files-requirements" | "context-files-references" | "context-files-workflow", enabled: boolean): void => {
4015
+ config[flagKey] = enabled;
4016
+ onConfigChange();
4017
+ ctx.ui.notify(`${flagKey.replace("context-files-", "").replace("-", " ")} context file ${enabled ? "enabled" : "disabled"}`, "info");
4018
+ };
4019
+ let focusedChoiceId: string | undefined;
4020
+ while (true) {
4021
+ const choice = await showPiUsereqSettingsMenu(ctx, "Context Files", buildContextFilesMenuChoices(config), {
4022
+ initialSelectedId: focusedChoiceId,
4023
+ getChoices: () => buildContextFilesMenuChoices(config),
4024
+ onChange: (choiceId, newValue) => {
4025
+ if (choiceId === "context-files-requirements") {
4026
+ setFlag("context-files-requirements", newValue === "on");
4027
+ return;
4028
+ }
4029
+ if (choiceId === "context-files-references") {
4030
+ setFlag("context-files-references", newValue === "on");
4031
+ return;
4032
+ }
4033
+ if (choiceId === "context-files-workflow") {
4034
+ setFlag("context-files-workflow", newValue === "on");
4035
+ }
4036
+ },
4037
+ });
4038
+ if (!choice) {
4039
+ return;
4040
+ }
4041
+ focusedChoiceId = choice;
4042
+ if (choice === "reset-defaults") {
4043
+ const resetPreview: ResetConfirmationChange[] = [
4044
+ { label: "REQUIREMENTS.md", previousValue: config["context-files-requirements"] ? "on" : "off", nextValue: DEFAULT_CONTEXT_FILES_FLAG ? "on" : "off" },
4045
+ { label: "REFERENCES.md", previousValue: config["context-files-references"] ? "on" : "off", nextValue: DEFAULT_CONTEXT_FILES_FLAG ? "on" : "off" },
4046
+ { label: "WORKFLOW.md", previousValue: config["context-files-workflow"] ? "on" : "off", nextValue: DEFAULT_CONTEXT_FILES_FLAG ? "on" : "off" },
4047
+ ].filter((change) => change.previousValue !== change.nextValue);
4048
+ const approved = await confirmResetChanges(
4049
+ ctx,
4050
+ "Confirm Context Files reset",
4051
+ resetPreview,
4052
+ "Approve restoring the default Context Files configuration (all three files enabled).",
4053
+ "Abort the Context Files reset and keep the current values.",
4054
+ );
4055
+ if (!approved) {
4056
+ ctx.ui.notify("Aborted Context Files reset", "info");
4057
+ continue;
4058
+ }
4059
+ config["context-files-requirements"] = DEFAULT_CONTEXT_FILES_FLAG;
4060
+ config["context-files-references"] = DEFAULT_CONTEXT_FILES_FLAG;
4061
+ config["context-files-workflow"] = DEFAULT_CONTEXT_FILES_FLAG;
4062
+ onConfigChange();
4063
+ ctx.ui.notify("Restored default Context Files configuration", "info");
4064
+ continue;
4065
+ }
4066
+ }
4067
+ }
4068
+
3952
4069
  /**
3953
4070
  * @brief Builds the shared settings-menu choices for the top-level pi-usereq configuration UI.
3954
- * @details Serializes primary configuration actions into right-valued menu rows consumed by the shared settings-menu renderer, including 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.
4071
+ * @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.
3955
4072
  * @param[in] cwd {string} Current working directory.
3956
4073
  * @param[in] config {UseReqConfig} Effective project configuration.
3957
4074
  * @return {PiUsereqSettingsMenuChoice[]} Ordered top-level menu choices.
3958
- * @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
4075
+ * @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
3959
4076
  */
3960
4077
  function buildPiUsereqMenuChoices(
3961
4078
  cwd: string,
@@ -3985,6 +4102,12 @@ function buildPiUsereqMenuChoices(
3985
4102
  value: config["tests-dir"],
3986
4103
  description: "Edit the repository-relative directory used for project test assets and static-check selection.",
3987
4104
  },
4105
+ {
4106
+ id: "context-files",
4107
+ label: "Context Files",
4108
+ value: formatContextFilesSummary(config),
4109
+ description: "Toggle injection of REQUIREMENTS.md, REFERENCES.md, and WORKFLOW.md into prompt context through `%%CONTEXT_FILES%%`.",
4110
+ },
3988
4111
  {
3989
4112
  id: "auto-git-commit",
3990
4113
  label: "Auto git commit",
@@ -4113,7 +4236,7 @@ function buildSrcDirRemovalChoices(config: UseReqConfig): PiUsereqSettingsMenuCh
4113
4236
  * @param[in] ctx {ExtensionCommandContext} Active command context.
4114
4237
  * @param[in,out] statusController {PiUsereqStatusController} Mutable status controller.
4115
4238
  * @return {Promise<void>} Promise resolved when configuration is saved and the menu closes.
4116
- * @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
4239
+ * @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
4117
4240
  */
4118
4241
  async function configurePiUsereq(
4119
4242
  pi: ExtensionAPI,
@@ -4193,6 +4316,10 @@ async function configurePiUsereq(
4193
4316
  }
4194
4317
  continue;
4195
4318
  }
4319
+ if (choice === "context-files") {
4320
+ await configureContextFilesMenu(ctx, config, persistConfigChange);
4321
+ continue;
4322
+ }
4196
4323
  if (choice === "auto-git-commit") {
4197
4324
  const nextAutoGitCommit = config.AUTO_GIT_COMMIT === "enable"
4198
4325
  ? "disable"
@@ -4335,6 +4462,7 @@ async function configurePiUsereq(
4335
4462
  { label: "Document directory", previousValue: config["docs-dir"], nextValue: defaultConfig["docs-dir"] },
4336
4463
  { label: "Source-code directories", previousValue: config["src-dir"].join(", "), nextValue: defaultConfig["src-dir"].join(", ") },
4337
4464
  { label: "Unit tests directory", previousValue: config["tests-dir"], nextValue: defaultConfig["tests-dir"] },
4465
+ { label: "Context Files", previousValue: formatContextFilesSummary(config), nextValue: formatContextFilesSummary(defaultConfig) },
4338
4466
  { label: "Auto git commit", previousValue: config.AUTO_GIT_COMMIT, nextValue: defaultConfig.AUTO_GIT_COMMIT },
4339
4467
  { label: "Git worktree", previousValue: config.GIT_WORKTREE_ENABLED, nextValue: defaultConfig.GIT_WORKTREE_ENABLED },
4340
4468
  { label: "Worktree prefix", previousValue: config.GIT_WORKTREE_PREFIX, nextValue: defaultConfig.GIT_WORKTREE_PREFIX },
@@ -4395,7 +4523,7 @@ function registerConfigCommands(
4395
4523
  * @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.
4396
4524
  * @param[in] pi {ExtensionAPI} Active extension API instance.
4397
4525
  * @return {void} No return value.
4398
- * @satisfies DES-002, DES-015, REQ-004, REQ-005, REQ-009, REQ-044, REQ-067, REQ-068, REQ-109, REQ-111, REQ-112, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117, REQ-118, REQ-119, REQ-120, REQ-121, REQ-122, REQ-123, REQ-124, REQ-125, REQ-126, REQ-127, REQ-128, REQ-131, REQ-132, REQ-133, REQ-134, REQ-137, REQ-159, REQ-163, REQ-164, REQ-165, REQ-166, REQ-167, REQ-168, REQ-169, REQ-172, REQ-174, REQ-179, REQ-180, REQ-184, REQ-188, REQ-190, REQ-191, REQ-192, REQ-193, REQ-194, REQ-195, REQ-196, REQ-197, REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-241, REQ-242, REQ-243, REQ-244, REQ-245, REQ-246, REQ-247, REQ-298, REQ-299, REQ-300, REQ-301, REQ-302, REQ-303, REQ-304, REQ-305, REQ-306, REQ-312, REQ-313, REQ-323, REQ-324, REQ-325
4526
+ * @satisfies DES-002, DES-015, REQ-004, REQ-005, REQ-009, REQ-044, REQ-067, REQ-068, REQ-109, REQ-111, REQ-112, REQ-113, REQ-114, REQ-115, REQ-116, REQ-117, REQ-118, REQ-119, REQ-120, REQ-121, REQ-122, REQ-123, REQ-124, REQ-125, REQ-126, REQ-127, REQ-128, REQ-131, REQ-132, REQ-133, REQ-134, REQ-137, REQ-159, REQ-163, REQ-164, REQ-165, REQ-166, REQ-167, REQ-168, REQ-169, REQ-172, REQ-174, REQ-179, REQ-180, REQ-184, REQ-188, REQ-190, REQ-191, REQ-192, REQ-193, REQ-194, REQ-195, REQ-196, REQ-197, REQ-236, REQ-237, REQ-238, REQ-239, REQ-240, REQ-241, REQ-242, REQ-243, REQ-244, REQ-245, REQ-246, REQ-247, REQ-298, REQ-299, REQ-300, REQ-301, REQ-302, REQ-303, REQ-304, REQ-305, REQ-306, REQ-312, REQ-313, REQ-323, REQ-324, REQ-325, REQ-326, REQ-327
4399
4527
  */
4400
4528
  export default function piUsereqExtension(pi: ExtensionAPI): void {
4401
4529
  const statusController = createPiUsereqStatusController();