pi-usereq 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore +3 -0
- package/CHANGELOG.md +41 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/{req → pi-usereq}/docs/REFERENCES.md +499 -491
- package/{req → pi-usereq}/docs/REQUIREMENTS.md +84 -62
- package/{req → pi-usereq}/docs/WORKFLOW.md +87 -102
- package/src/core/agent-tool-json.ts +42 -193
- package/src/core/compress-payload.ts +7 -15
- package/src/core/config.ts +39 -12
- package/src/core/extension-status.ts +94 -58
- package/src/core/find-payload.ts +21 -44
- package/src/core/pi-notify.ts +198 -11
- package/src/core/reference-payload.ts +6 -14
- package/src/core/runtime-project-paths.ts +3 -32
- package/src/core/settings-menu.ts +9 -4
- package/src/core/static-check.ts +35 -171
- package/src/core/token-counter.ts +3 -121
- package/src/index.ts +339 -180
- package/tests/attended-results-scenarios.ts +3 -13
- package/tests/cli-command-option-parity.test.ts +21 -12
- package/tests/debug-extension-harness.test.ts +20 -22
- package/tests/extension-registration.test.ts +394 -157
- package/tests/oracle-project.test.ts +8 -3
- package/tests/oracle-standalone.test.ts +7 -13
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-pylance/fixture_zig.zig.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_c.c.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_cpp.cpp.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_csharp.cs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_elixir.ex.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_go.go.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_haskell.hs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_java.java.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_javascript.js.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_kotlin.kt.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_lua.lua.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_perl.pl.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_php.php.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_python.py.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_ruby.rb.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_rust.rs.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_scala.scala.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_shell.sh.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_swift.swift.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_typescript.ts.json +0 -5
- package/tests/fixtures_attended_results/standalone/test-static-check-ruff/fixture_zig.zig.json +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "PI-useReq Requirements"
|
|
3
3
|
description: Software requirements specification
|
|
4
|
-
version: "0.0.
|
|
4
|
+
version: "0.0.36"
|
|
5
5
|
date: "2026-04-19"
|
|
6
6
|
author: "OpenAI Codex"
|
|
7
7
|
scope:
|
|
@@ -68,7 +68,7 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
68
68
|
- **DES-001**: MUST implement the standalone executable in `src/cli.ts` as flag parsing plus dispatch to `tool-runner.ts` or `runStaticCheck`.
|
|
69
69
|
- **DES-002**: MUST implement extension activation in `src/index.ts` by registering prompt commands, agent tools, configuration commands, and shared wrappers for supported pi CLI lifecycle hooks.
|
|
70
70
|
- **DES-003**: MUST represent parsed source constructs as `SourceElement` instances produced by `SourceAnalyzer` and enriched with signatures, hierarchy, visibility, inheritance, body annotations, and Doxygen fields.
|
|
71
|
-
- **DES-004**: MUST implement static-check execution through `StaticCheckBase
|
|
71
|
+
- **DES-004**: MUST implement modular static-check execution through debug-capable `StaticCheckBase` and user-facing `StaticCheckCommand`, selected by `dispatchStaticCheckForFile`.
|
|
72
72
|
- **DES-005**: MUST centralize project file collection, token/reference/compress/find operations, git checks, docs checks, and worktree helpers in `src/core/tool-runner.ts`.
|
|
73
73
|
- **DES-006**: MUST keep CLI compression and construct-search renderers as markdown blocks headed by `@@@ <path> | <language>`, while agent-tool compression and construct-search responses use dedicated JSON payload builders.
|
|
74
74
|
- **DES-007**: MUST implement the standalone debug surface in `scripts/debug-extension.ts`, `scripts/pi-usereq-debug.sh`, and `scripts/lib/` recording and SDK-probe modules without altering extension runtime control flow.
|
|
@@ -110,10 +110,11 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
110
110
|
- **REQ-066**: MUST omit `reset-context` and `context-reset` fields from persisted project configuration.
|
|
111
111
|
- **REQ-067**: MUST send every rendered `req-<prompt>` payload into the current active session.
|
|
112
112
|
- **REQ-068**: MUST use one prompt-delivery path that never creates replacement sessions or pre-reset flows.
|
|
113
|
-
- **REQ-008**: MUST provide a static-check submenu that adds entries by guided language
|
|
113
|
+
- **REQ-008**: MUST provide a static-check submenu that adds Command entries by guided language flow or raw spec, removes language entries, and shows supported languages.
|
|
114
|
+
- **REQ-160**: MUST hardcode `Command` as the only user-configurable static-check module and omit module-selection UI from static-check configuration menus.
|
|
115
|
+
- **REQ-161**: MUST hide `Dummy` from user-configurable static-check menus while preserving existing-config parsing and debug-driver support for `Dummy` entries.
|
|
114
116
|
- **REQ-009**: MUST refresh shared runtime path context, apply configured startup tools, and publish single-line `pi-usereq` status text during `session_start`.
|
|
115
|
-
- **REQ-109**: MUST make the single-line status bar render
|
|
116
|
-
- **REQ-110**: MUST make the single-line status bar render `tools` as the count of active tools.
|
|
117
|
+
- **REQ-109**: MUST make the single-line status bar render the explicit runtime `base` path and omit `docs`, `src`, and `tests` path fields.
|
|
117
118
|
- **REQ-111**: MUST omit prompt-delivery mode fields from the single-line status bar.
|
|
118
119
|
- **REQ-112**: MUST render status-bar field names with the active theme `accent` token and field values with the active theme `warning` token.
|
|
119
120
|
- **REQ-113**: MUST register shared event wrappers for `resources_discover`, `session_start`, `session_before_switch`, `session_before_fork`, `session_before_compact`, `session_compact`, and `session_shutdown`.
|
|
@@ -123,24 +124,36 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
123
124
|
- **REQ-117**: MUST route every intercepted hook through `updateExtensionStatus` with the originating hook name and event payload, even when no hook-specific side effect exists.
|
|
124
125
|
- **REQ-118**: MUST obtain latest context-usage facts from `ctx.getContextUsage()` or an equivalent runtime API and store them in extension session state.
|
|
125
126
|
- **REQ-119**: MUST refresh stored context-usage facts during `session_start` and after intercepted events before rebuilding the status bar when newer data is available.
|
|
126
|
-
- **REQ-120**: MUST render single-line status fields in this order: `
|
|
127
|
-
- **REQ-121**: MUST render `context` immediately after `
|
|
128
|
-
- **REQ-122**: MUST compute filled `context` cells by ceiling `usagePercent *
|
|
129
|
-
- **REQ-123**: MUST render `elapsed` immediately after `context
|
|
130
|
-
- **REQ-124**: MUST render
|
|
131
|
-
- **REQ-125**: MUST
|
|
127
|
+
- **REQ-120**: MUST render single-line status fields in this order: `base`, `context`, `elapsed`, `beep`, `sound`.
|
|
128
|
+
- **REQ-121**: MUST render `context` immediately after `base` with separator ` • ` and a 10-cell bar using `▓` for filled cells.
|
|
129
|
+
- **REQ-122**: MUST compute filled `context` cells by ceiling `usagePercent * 10 / 100`, except 0 percent MUST produce 0 filled cells.
|
|
130
|
+
- **REQ-123**: MUST render `elapsed` immediately after `context` as `⏱︎ <active> ⚑ <last> ⌛︎ <total>`.
|
|
131
|
+
- **REQ-124**: MUST render `⏱︎ --:--` when no prompt is active, and `⚑ --:--` plus `⌛︎ --:--` until the corresponding timers receive a normally completed prompt duration.
|
|
132
|
+
- **REQ-125**: MUST render timed `elapsed` segments as `M:SS`, keep minutes unbounded above 59, zero-pad seconds to two digits, and preserve `⚑` plus `⌛︎` when escape-triggered cancellation ends the active run.
|
|
132
133
|
- **REQ-126**: MUST render `context` bar cells as theme `warning` `▓` glyphs on a background derived from the active theme `accent` token.
|
|
133
|
-
- **REQ-127**: MUST overlay the literal
|
|
134
|
-
- **REQ-128**: MUST overlay the literal `FULL
|
|
135
|
-
- **REQ-129**: MUST persist independent terminal-beep flags for successful prompt completion, escape-triggered prompt abortion, and error-terminated prompt completion, defaulting each flag to
|
|
134
|
+
- **REQ-127**: MUST overlay the literal `◀ CLEAR ▶ ` with the theme `warning` token on an `accent`-derived background when normalized context usage is unavailable or equals 0 percent.
|
|
135
|
+
- **REQ-128**: MUST overlay the centered literal ` ◀ FULL ▶ ` with the active theme `error` token on a theme `warning` background when normalized context usage exceeds 90 percent.
|
|
136
|
+
- **REQ-129**: MUST persist independent terminal-beep flags for successful prompt completion, escape-triggered prompt abortion, and error-terminated prompt completion, defaulting each flag to enabled.
|
|
136
137
|
- **REQ-130**: MUST dispatch enabled terminal-beep events through `notifyWindows`, `notifyOSC99`, `notifyOSC9`, or `notifyOSC777` when the matching prompt lifecycle outcome occurs.
|
|
137
138
|
- **REQ-131**: MUST persist a successful-prompt external sound level with allowed values `none`, `low`, `mid`, and `high`, defaulting to `none`.
|
|
138
139
|
- **REQ-132**: MUST execute the configured successful-prompt external sound command only when the prompt ends without abort or error and the sound level is not `none`.
|
|
139
140
|
- **REQ-133**: MUST persist configurable shell-command strings for sound levels `low`, `mid`, and `high`, and MUST substitute `%%INSTALLATION_PATH%%` with the runtime extension installation path before execution.
|
|
140
141
|
- **REQ-134**: MUST persist a configurable sound-level toggle shortcut, defaulting to `alt+s`, and MUST cycle sound levels in the order `none`, `low`, `mid`, `high`, `none`.
|
|
141
|
-
- **REQ-135**: MUST render `beep` immediately after `
|
|
142
|
+
- **REQ-135**: MUST render `beep` immediately after `et`, showing `none` or the comma-ordered enabled event tokens `end`, `esc`, and `err`.
|
|
142
143
|
- **REQ-136**: MUST render `sound` immediately after `beep`, showing one of `none`, `low`, `mid`, or `high`.
|
|
143
144
|
- **REQ-137**: MUST make the configuration UI expose controls for terminal-beep flags, selected notify command, sound toggle hotkey bind, and per-level notify commands.
|
|
145
|
+
- **REQ-163**: MUST persist successful-prompt Pushover settings `enabled=false`, `user=""`, `token=""`, and `priority=0` in project configuration.
|
|
146
|
+
- **REQ-164**: MUST make the notifications menu expose a `Pushover notifications` submenu immediately after the sound-notification submenu using the existing settings-list layout, navigation, descriptions, and value-column semantics.
|
|
147
|
+
- **REQ-165**: MUST make the Pushover submenu expose controls for successful-prompt enablement, `User Key/Delivery Group Key`, `Token/API Token Key`, and priority toggle `0=Normal` / `1=High Priority`.
|
|
148
|
+
- **REQ-166**: MUST suppress Pushover delivery whenever notification `global disable` is enabled, even when Pushover completion notifications remain enabled.
|
|
149
|
+
- **REQ-167**: MUST deliver successful-completion Pushover notifications through native Node HTTP or HTTPS requests to `https://api.pushover.net/1/messages.json` and MUST NOT invoke shell commands for Pushover delivery.
|
|
150
|
+
- **REQ-168**: MUST send a Pushover message only when the prompt completes successfully, Pushover completion notifications are enabled, and persisted `user` plus `token` values are non-empty.
|
|
151
|
+
- **REQ-169**: MUST send Pushover `title` as `<prompt> @ <base-path> [<time>]`, `message` as the prompt argument text used for `%%ARGS%%`, and `priority` as the persisted `0` or `1` value.
|
|
152
|
+
- **REQ-170**: MUST render single-line status fields in this order: `base`, `context`, `elapsed`, `beep`, `sound`, `pushover`.
|
|
153
|
+
- **REQ-171**: MUST render `pushover` immediately after `sound`, showing `on` or `off` from the Pushover successful-prompt enable setting.
|
|
154
|
+
- **REQ-172**: MUST make the Pushover submenu expose a `global disable` toggle that suppresses all Pushover delivery without mutating the successful-prompt enable setting.
|
|
155
|
+
- **REQ-159**: MUST increase `Σ` by each normally completed prompt duration and MUST NOT change `Σ` on escape-triggered cancellation.
|
|
156
|
+
- **REQ-173**: MUST optimize every agent-tool response for minimum token usage by excluding caller-known, static, duplicated, and registration-described facts from runtime payloads.
|
|
144
157
|
- **REQ-010**: MUST count tokens with `js-tiktoken` `cl100k_base`, count characters and lines, and make `files-tokens` emit agent-oriented JSON containing structured per-file metrics, extracted facts, and aggregate metrics.
|
|
145
158
|
- **REQ-011**: MUST generate explicit-file references by analyzing supported source files and emitting agent-oriented JSON with per-file metadata, imports, symbol records, and optional residual text.
|
|
146
159
|
- **REQ-012**: MUST compress supported source files by removing comments and blank lines, preserving indentation for Python, Haskell, and Elixir, and optionally preserving original line numbers.
|
|
@@ -149,45 +162,45 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
149
162
|
- **REQ-015**: MUST make CLI project-scope compression scan configured `src-dir` files and emit one compressed markdown block per supported file.
|
|
150
163
|
- **REQ-016**: MUST make `find` scan configured `src-dir` files using the requested tag filter and regular expression.
|
|
151
164
|
- **REQ-017**: MUST make `tokens` count only existing canonical docs `REQUIREMENTS.md`, `WORKFLOW.md`, and `REFERENCES.md`, reuse the structured `files-tokens` JSON contract, and fail when none exist.
|
|
152
|
-
- **REQ-069**: MUST
|
|
165
|
+
- **REQ-069**: MUST make `files-tokens` and `tokens` runtime payloads expose only `summary`, `files`, and `execution`, omitting request echoes and derived guidance from runtime responses.
|
|
153
166
|
- **REQ-070**: MUST emit counts, sizes, line counts, line ranges, and derived totals as JSON numbers with explicit unit-specific field names, keeping display strings optional and never as the sole carrier of numeric facts.
|
|
154
167
|
- **REQ-071**: MUST normalize `files-tokens` and `tokens` text fields by removing decorative formatting, isolating canonical paths, separating source-derived facts from guidance, and stripping non-semantic presentation artifacts.
|
|
155
|
-
- **REQ-072**: MUST register `files-tokens` and `tokens` with agent-oriented descriptions
|
|
168
|
+
- **REQ-072**: MUST register `files-tokens` and `tokens` with agent-oriented descriptions carrying static scope, encoding, canonical-doc selection, and failure facts omitted from runtime responses.
|
|
156
169
|
- **REQ-073**: MUST expose file-derived facts needed for direct access, including canonical path, language, existence, line counts, line ranges, and Doxygen-derived metadata, as dedicated JSON fields when available.
|
|
157
170
|
- **REQ-074**: MUST keep monolithic text summaries optional, place them after structured fields, and omit any fact from text-only representation when the same fact can be emitted as dedicated JSON.
|
|
158
|
-
- **REQ-075**: MUST
|
|
159
|
-
- **REQ-076**: MUST
|
|
171
|
+
- **REQ-075**: MUST surface `files-tokens` and `tokens` skip or read-error observations through per-file status fields and execution diagnostics instead of a dedicated guidance section.
|
|
172
|
+
- **REQ-076**: MUST make `files-references` and `references` runtime payloads expose only `summary`, `repository`, `files`, and `execution`, omitting request echoes from runtime responses.
|
|
160
173
|
- **REQ-077**: MUST expose symbol kind, path, declaration lines, counts, and line ranges as dedicated numeric or array fields, never only inside free-form strings.
|
|
161
174
|
- **REQ-078**: MUST expose parsed Doxygen fields as tag-specific JSON objects or arrays, keeping monolithic `text` only for unsplittable residual content.
|
|
162
175
|
- **REQ-079**: MUST normalize `files-references` and `references` text fields by removing decorative markdown artifacts and preserving only parser-relevant residual content.
|
|
163
|
-
- **REQ-080**: MUST register `files-references` and `references` with agent-oriented descriptions
|
|
164
|
-
- **REQ-081**: MUST make agent-tool `files-compress` and `compress` return structured JSON sections ordered as `
|
|
176
|
+
- **REQ-080**: MUST register `files-references` and `references` with agent-oriented descriptions carrying static scope, configuration, and failure facts omitted from runtime responses.
|
|
177
|
+
- **REQ-081**: MUST make agent-tool `files-compress` and `compress` return structured JSON sections ordered as `summary`, `repository`, `files`, and `execution`.
|
|
165
178
|
- **REQ-082**: MUST expose canonical paths, absolute paths, language IDs, source line counts, source line ranges, compressed line counts, and removed line counts as dedicated typed compression fields.
|
|
166
179
|
- **REQ-083**: MUST expose compressed excerpts through structured `compressed_lines` arrays and a separate `compressed_source_text` field, never only inside markdown headers, fences, or prefixed display strings.
|
|
167
180
|
- **REQ-084**: MUST expose file-level and symbol-level Doxygen fields as structured tag-specific JSON objects, and emit symbol records with declaration kind, canonical path, signatures, and numeric declaration line ranges.
|
|
168
181
|
- **REQ-085**: MUST keep residual monolithic text optional, place it after structured fields, and omit decorative markdown artifacts from compression JSON field values.
|
|
169
|
-
- **REQ-086**: MUST register `files-compress` and `compress` with agent-oriented descriptions
|
|
182
|
+
- **REQ-086**: MUST register `files-compress` and `compress` with agent-oriented descriptions carrying static scope, line-number behavior, selection rules, and failure facts omitted from runtime responses.
|
|
170
183
|
- **REQ-087**: MUST expose skipped inputs, unsupported extensions, compression failures, and zero-processable requests as structured statuses and stable error reasons, while keeping stderr diagnostics optional.
|
|
171
184
|
- **REQ-088**: MUST mirror the structured compression payload into tool `content[0].text` and tool `details`, with execution metadata nested under the mirrored JSON object.
|
|
172
|
-
- **REQ-089**: MUST make agent-tool `files-find` and `find` return structured JSON sections ordered as `
|
|
185
|
+
- **REQ-089**: MUST make agent-tool `files-find` and `find` return structured JSON sections ordered as `summary`, `repository`, `files`, and `execution`.
|
|
173
186
|
- **REQ-090**: MUST expose find request scope facts as dedicated fields, including tag filter, regex pattern, line-number mode, requested paths, configured source directories, and supported tags by language.
|
|
174
187
|
- **REQ-091**: MUST expose per-file and per-match find facts as dedicated fields, including canonical path, language, construct kind, symbol name, signature, declaration order, numeric line ranges, and stripped code lines.
|
|
175
188
|
- **REQ-092**: MUST expose parsed find Doxygen fields as tag-specific JSON objects or arrays for file-level and construct-level metadata, keeping monolithic residual text only when safe splitting is impossible.
|
|
176
189
|
- **REQ-093**: MUST emit find counts, file totals, match totals, line numbers, and line ranges as JSON numbers with explicit unit-specific field names, never only inside display strings.
|
|
177
190
|
- **REQ-094**: MUST normalize `files-find` and `find` text fields by removing markdown headers, fences, bullets, and other presentation-only artifacts from structured JSON values.
|
|
178
|
-
- **REQ-095**: MUST register `files-find` and `find` with agent-oriented descriptions
|
|
191
|
+
- **REQ-095**: MUST register `files-find` and `find` with agent-oriented descriptions carrying static regex semantics, supported tags by language, and failure facts omitted from runtime responses.
|
|
179
192
|
- **REQ-096**: MUST expose structured statuses for skipped files, unsupported languages, invalid tag filters, invalid regex patterns, no-match outcomes, and analysis failures, while keeping stderr diagnostics optional.
|
|
180
193
|
- **REQ-097**: MUST mirror the structured find payload into tool `content[0].text` and tool `details`, with execution metadata nested under the mirrored JSON object.
|
|
181
194
|
- **REQ-098**: MUST keep monolithic find `text` fields optional, place them after structured fields, and omit any fact from text-only representation when a dedicated JSON field can carry it.
|
|
182
|
-
- **REQ-099**: MUST make every agent-tool response expose a JSON-first tree whose
|
|
183
|
-
- **REQ-100**: MUST encode quantitative facts as JSON numbers in unit-specific fields, keep textual fields free of decorative formatting
|
|
184
|
-
- **REQ-101**: MUST register every agent tool with machine-oriented metadata describing purpose,
|
|
185
|
-
- **REQ-102**: MUST make every structured agent-tool execute result mirror the same JSON object into `content[0].text` and `details`, nesting execution metadata under dedicated `execution` fields.
|
|
186
|
-
- **REQ-018**: MUST expose the `test-static-check` driver only through standalone CLI `--test-static-check`, dispatching `dummy
|
|
195
|
+
- **REQ-099**: MUST make every agent-tool response expose a JSON-first tree whose runtime fields are directly accessible and whose caller-known or registration-described facts are omitted.
|
|
196
|
+
- **REQ-100**: MUST encode quantitative facts as JSON numbers in unit-specific fields, keep textual fields free of decorative formatting, and avoid duplicate or derivable facts in runtime payloads.
|
|
197
|
+
- **REQ-101**: MUST register every agent tool with machine-oriented metadata describing purpose, parameters, static scope facts, omitted response facts, output schema, specialized behaviors, and stable error conditions.
|
|
198
|
+
- **REQ-102**: MUST make every structured agent-tool execute result mirror the same JSON object into `content[0].text` and `details`, nesting only residual execution metadata under dedicated `execution` fields.
|
|
199
|
+
- **REQ-018**: MUST expose the `test-static-check` driver only through standalone CLI `--test-static-check`, dispatching `dummy` or `command` checker subcommands directly.
|
|
187
200
|
- **REQ-019**: MUST resolve each explicit static-check file by extension and run every configured checker for that language while capturing only failing checker output.
|
|
188
|
-
- **REQ-020**: MUST parse static-check
|
|
189
|
-
- **REQ-021**: MUST reject static-check
|
|
190
|
-
- **REQ-022**: MUST
|
|
201
|
+
- **REQ-020**: MUST parse user `--enable-static-check` specs in `LANG=Command,CMD[,PARAM...]` format and normalize supported language names plus `Command` case-insensitively.
|
|
202
|
+
- **REQ-021**: MUST reject user `--enable-static-check` specs with missing `=`, missing `Command`, missing `cmd`, unknown language, or any module other than `Command`.
|
|
203
|
+
- **REQ-022**: MUST preserve persisted `Dummy` static-check entries during config loading and execute them only when present in configuration or `--test-static-check dummy` input.
|
|
191
204
|
- **REQ-023**: MUST require `Command`-module executables to exist on `PATH` before static-check execution.
|
|
192
205
|
- **REQ-024**: MUST make `git-check` fail unless configured `git-path` exists, resolves inside a work tree, has no porcelain changes, and has a valid `HEAD`.
|
|
193
206
|
- **REQ-025**: MUST make `docs-check` fail when `REQUIREMENTS.md`, `WORKFLOW.md`, or `REFERENCES.md` is missing and name the prompt command that should generate the missing file.
|
|
@@ -201,12 +214,13 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
201
214
|
- **REQ-105**: MUST make `git-path` print the derived repository root only when it equals `base-path` or is an ancestor of `base-path`.
|
|
202
215
|
- **REQ-106**: MUST make prompt `%%GUIDELINES_FILES%%`, `%%GUIDELINES_PATH%%`, and `%%TEMPLATE_PATH%%` resolve under `<installation-path>/resources`.
|
|
203
216
|
- **REQ-107**: MUST express prompt-visible `installation-path`, `execution-path`, `base-path`, `config-path`, template paths, and guideline paths relative to user home using platform-native home environment variables.
|
|
204
|
-
- **REQ-031**: MUST make the `pi-usereq` menu expose a `show-config` action
|
|
217
|
+
- **REQ-031**: MUST make the `pi-usereq` menu expose a `show-config` action after `notifications` and before `Reset defaults`, writing the current project configuration JSON to the editor.
|
|
218
|
+
- **REQ-162**: MUST render the `show-config` current value as the user-home-relative extension config path using the settings-list `dim` value style.
|
|
205
219
|
- **REQ-032**: MUST inject a pi.dev conformance block into rendered prompts when `docs/pi.dev/agent-document-manifest.json` exists under the project base.
|
|
206
220
|
- **REQ-033**: MUST make that conformance block require manifest-guided document review before implementing or changing extension code that interfaces with pi CLI.
|
|
207
221
|
- **REQ-034**: MUST make that conformance block require manifest-guided document review before validating, analyzing, or fixing extension code that interfaces with pi CLI.
|
|
208
222
|
- **REQ-108**: MUST make that conformance block require API-level compliance with `docs/pi.dev/agent-document-manifest.json` for new or modified software that interfaces with the pi.dev CLI.
|
|
209
|
-
- **REQ-035**: MUST parse repeatable `--enable-static-check LANG=
|
|
223
|
+
- **REQ-035**: MUST parse repeatable `--enable-static-check LANG=Command,CMD[,PARAM...]` CLI options before command dispatch and merge resulting entries into persisted project configuration for the current project base.
|
|
210
224
|
- **REQ-036**: MUST preserve existing `static-check` entries, append non-duplicate `--enable-static-check` entries in argument order, and treat canonical language, module, cmd, and params as the duplicate identity.
|
|
211
225
|
- **REQ-037**: MUST reject `--enable-static-check` `Command` entries whose executable is unavailable on `PATH` and MUST NOT modify persisted project configuration when validation fails.
|
|
212
226
|
- **REQ-038**: MUST honor `--verbose` only for `files-references`, `files-compress`, `files-find`, `references`, `compress`, and `find`, emitting command progress to stderr while leaving stdout payload format unchanged.
|
|
@@ -227,8 +241,7 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
227
241
|
- **REQ-144**: MUST default `PI_NOTIFY_SOUND_HIGH_CMD` to `paplay --volume=65535 %%INSTALLATION_PATH%%/resources/sounds/Soft-high-tech-notification-sound-effect.mp3`.
|
|
228
242
|
- **REQ-145**: MUST derive `git-path` only at runtime from the current working directory and repository ancestry rules, ignoring project-configuration JSON values.
|
|
229
243
|
- **REQ-146**: MUST NOT read or persist `base-path` or `git-path` in project-configuration JSON.
|
|
230
|
-
- **REQ-
|
|
231
|
-
- **REQ-148**: MUST render status-bar `base` as `.` when `base-path` equals or lacks `git-path`, otherwise as the path relative to `git-path`.
|
|
244
|
+
- **REQ-148**: MUST render status-bar `base` as the absolute runtime `base-path` with no git-relative shortening.
|
|
232
245
|
- **REQ-149**: MUST label notification settings actions as `Selected notify command`, `Sound toggle hotkey bind`, `Notify command (low vol.)`, `Notify command (mid vol.)`, and `Notify command (high vol.)`.
|
|
233
246
|
- **REQ-150**: MUST omit overview rows and reference-only actions from the main and notification configuration menus.
|
|
234
247
|
- **REQ-151**: MUST render `pi-usereq`, notification, static-check, and startup-tool menus with left-aligned labels and right-aligned current values using the active CLI settings-list theme semantics.
|
|
@@ -240,18 +253,24 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
240
253
|
## 4. Test Requirements
|
|
241
254
|
- **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.
|
|
242
255
|
- **TST-002**: MUST verify installed bundled prompt, template, and guideline resources remain readable from `installation-path` and prompt rendering replaces all dynamic placeholders with runtime path context.
|
|
243
|
-
- **TST-003**: MUST verify standalone CLI outputs
|
|
244
|
-
- **TST-004**: MUST verify project
|
|
245
|
-
- **TST-005**: MUST verify the configuration menu persists `docs-dir`, disables startup tools, adds static-check entries, and omits prompt-delivery mode controls.
|
|
256
|
+
- **TST-003**: MUST verify standalone `files-*` CLI outputs match the Python oracle and `--test-static-check` dummy/command outputs match archived fixtures for every fixture file.
|
|
257
|
+
- **TST-004**: MUST verify project `compress`, `find`, `tokens`, `git-check`, `docs-check`, `git-path`, and `get-base-path` outputs match the Python oracle, and verify `files-static-check` plus `static-check` against archived fixtures.
|
|
258
|
+
- **TST-005**: MUST verify the configuration menu persists `docs-dir`, disables startup tools, adds Command static-check entries, and omits prompt-delivery mode controls.
|
|
259
|
+
- **TST-046**: MUST verify static-check menus omit module selection and hide `Dummy`, `Pylance`, and `Ruff` from user-configurable actions.
|
|
246
260
|
- **TST-006**: MUST verify `session_start` activates configured startup tools and updates the single-line `pi-usereq` status bar.
|
|
247
|
-
- **TST-031**: MUST verify the status bar renders explicit
|
|
261
|
+
- **TST-031**: MUST verify the status bar renders the explicit base path, omits `docs`, `src`, `tests`, `git`, and `tools`, and preserves active-theme `accent`/`warning` field-value token separation.
|
|
248
262
|
- **TST-032**: MUST verify extension registration installs wrappers for all documented lifecycle hooks and routes replayed hook payloads through `updateExtensionStatus`.
|
|
249
|
-
- **TST-033**: MUST verify the status bar renders ordered `
|
|
263
|
+
- **TST-033**: MUST verify the status bar renders ordered `base`, `context`, `elapsed`, `beep`, and `sound` fields plus the ceiling-based 10-cell context bar.
|
|
250
264
|
- **TST-037**: MUST verify the configuration menu persists terminal-beep flags, selected notify command, sound toggle hotkey bind, and per-level notify commands using the documented menu labels.
|
|
251
265
|
- **TST-038**: MUST verify the sound-toggle shortcut cycles persisted sound levels and refreshes the status bar with the updated `sound` field.
|
|
252
|
-
- **TST-
|
|
253
|
-
- **TST-
|
|
254
|
-
- **TST-
|
|
266
|
+
- **TST-047**: MUST verify the notifications menu exposes the Pushover submenu after sound settings and persists Pushover enable, user key, token, and priority values.
|
|
267
|
+
- **TST-048**: MUST verify successful prompt completion sends one native Pushover request with the documented endpoint and payload, and suppresses delivery on abort, error, global disable, or missing credentials.
|
|
268
|
+
- **TST-049**: MUST verify the status bar renders ordered `base`, `context`, `elapsed`, `beep`, `sound`, and `pushover` fields and appends `pushover:on|off` using the Pushover enable setting.
|
|
269
|
+
- **TST-050**: MUST verify the Pushover `global disable` toggle suppresses delivery without changing the persisted successful-prompt enable setting.
|
|
270
|
+
- **TST-034**: MUST verify `ctx.getContextUsage()` snapshots refresh status updates and `elapsed` preserves `⚑` plus `⌛︎` across escape-triggered cancellation.
|
|
271
|
+
- **TST-045**: MUST verify default configuration enables terminal-beep flags `end`, `esc`, and `err` before user customization.
|
|
272
|
+
- **TST-035**: MUST verify unavailable or 0-percent context usage renders the literal `◀ CLEAR ▶ ` with the theme `warning` token on the preserved `accent`-derived context-bar background.
|
|
273
|
+
- **TST-036**: MUST verify context usage above 90 percent renders the literal ` ◀ FULL ▶ ` with the theme `error` token on the preserved theme `warning` background.
|
|
255
274
|
- **TST-043**: MUST verify configuration menus reuse the active CLI settings-list theme semantics for labels, values, descriptions, cursor, and hints.
|
|
256
275
|
- **TST-007**: MUST verify `git-path` output ignores stale stored values and resolves only a current repository root that is identical to or an ancestor of `base-path`.
|
|
257
276
|
- **TST-008**: MUST verify `git-wt-create` and `git-wt-delete` create, configure, copy `.pi-usereq`, and remove the named worktree as observable filesystem side effects.
|
|
@@ -269,19 +288,19 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
269
288
|
- **TST-019**: MUST verify offline harness command and tool replay invoke registered handlers, preserve requested cwd semantics, and capture prompt payloads, tool results, and UI side effects.
|
|
270
289
|
- **TST-020**: MUST verify SDK parity comparison reports aligned inventories as clean, reports requested mismatch categories, and `package.json` declares the `debug:ext*` harness scripts.
|
|
271
290
|
- **TST-021**: MUST verify `scripts/pi-usereq-debug.sh tool` forwards `--params` unchanged and converts `--args` text into the JSON object forwarded through `--params`.
|
|
272
|
-
- **TST-022**: MUST verify `files-references` and `references` JSON outputs expose repository, file, symbol, location, and Doxygen facts through dedicated structured fields.
|
|
273
|
-
- **TST-023**: MUST verify harness inspection surfaces agent-oriented `files-references` and `references` tool descriptions with output schema,
|
|
274
|
-
- **TST-024**: MUST verify `files-find` and `find` JSON outputs expose
|
|
291
|
+
- **TST-022**: MUST verify `files-references` and `references` JSON outputs expose repository, file, symbol, location, and Doxygen facts through dedicated structured fields while omitting request echoes.
|
|
292
|
+
- **TST-023**: MUST verify harness inspection surfaces agent-oriented `files-references` and `references` tool descriptions with output schema, static scope facts, specialized behaviors, and failure details.
|
|
293
|
+
- **TST-024**: MUST verify `files-find` and `find` JSON outputs expose summary, repository, file, match, location, and Doxygen facts through dedicated structured fields while omitting request echoes.
|
|
275
294
|
- **TST-025**: MUST verify harness inspection surfaces agent-oriented `files-find` and `find` tool descriptions with input schema, output schema, line-number behavior, regex semantics, supported tags by language, and failure details.
|
|
276
|
-
- **TST-026**: MUST verify `files-compress` and `compress` JSON outputs expose structured
|
|
295
|
+
- **TST-026**: MUST verify `files-compress` and `compress` JSON outputs expose structured summary, repository, line, symbol, status, and Doxygen facts through dedicated fields while omitting request echoes.
|
|
277
296
|
- **TST-027**: MUST verify harness inspection surfaces agent-oriented `files-compress` and `compress` tool descriptions with parameters, line-number behavior, output schema, specialization triggers, and failure conditions.
|
|
278
|
-
- **TST-028**: MUST verify path, static-check, git, docs, and worktree agent-tool outputs expose structured JSON
|
|
297
|
+
- **TST-028**: MUST verify path, static-check, git, docs, and worktree agent-tool outputs expose structured JSON result, summary, file, and execution facts while omitting request echoes and runtime-path duplication.
|
|
279
298
|
- **TST-029**: MUST verify harness inspection surfaces machine-oriented descriptions for path, static-check, git, docs, and worktree tools, including parameters, output schema, specialization triggers, and failure conditions.
|
|
280
299
|
- **TST-039**: MUST verify `.github/workflows/release-npm.yml` keeps the existing tag filter, gates downstream release work on `origin/master`, runs npm publication, and creates the GitHub Release from generated changelog text.
|
|
281
300
|
- **TST-042**: MUST verify `package.json` keeps `name` equal to `pi-usereq` so npm publication resolves to `https://www.npmjs.com/package/pi-usereq`.
|
|
282
301
|
- **TST-044**: MUST verify `package.json` keeps npm provenance metadata aligned to the canonical GitHub repository, issues URL, and README homepage.
|
|
283
302
|
- **TST-040**: MUST verify `.pi-usereq/config.json` omits `base-path` and `git-path`, while runtime path tools and status rendering still derive both values correctly.
|
|
284
|
-
- **TST-041**: MUST verify the `pi-usereq` menu exposes `show-config`
|
|
303
|
+
- **TST-041**: MUST verify the `pi-usereq` menu exposes `show-config` after `notifications` and before `Reset defaults`, shows the home-relative config path in the value column, and omits overview rows plus notification reference-only actions.
|
|
285
304
|
|
|
286
305
|
## 5. Observed Component Model
|
|
287
306
|
|
|
@@ -291,7 +310,7 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
291
310
|
- `src/core/tool-runner.ts` orchestrates project file collection, markdown generation, compression, construct search, docs checks, git checks, and worktree lifecycle actions.
|
|
292
311
|
- `src/core/source-analyzer.ts` defines `SourceElement`, language specs, extraction heuristics, Doxygen attachment, and Markdown rendering support.
|
|
293
312
|
- `src/core/generate-markdown.ts`, `src/core/compress.ts`, and `src/core/find-constructs.ts` share analyzer and compressor logic to produce reusable Markdown outputs.
|
|
294
|
-
- `src/core/static-check.ts` maps languages/extensions, parses enable specs, resolves inputs, and dispatches checker classes.
|
|
313
|
+
- `src/core/static-check.ts` maps languages/extensions, parses Command-only enable specs, preserves debug `Dummy` handling, resolves inputs, and dispatches modular checker classes.
|
|
295
314
|
- `src/core/config.ts`, `src/core/resources.ts`, and `src/core/prompts.ts` provide config persistence, home-resource synchronization, and prompt rendering.
|
|
296
315
|
- `src/core/doxygen-parser.ts` normalizes Doxygen tags reused by source references and construct search output.
|
|
297
316
|
- `scripts/debug-extension.ts`, `scripts/pi-usereq-debug.sh`, and `scripts/lib/*.ts` provide the standalone extension debug harness, bash wrapper, recording adapters, offline replay, SDK parity probing, and usage-manual rendering.
|
|
@@ -379,8 +398,8 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
379
398
|
### 7.1 Covered Behaviors
|
|
380
399
|
- `tests/extension-registration.test.ts` covers extension registration, config-menu persistence, startup-tool enablement, runtime `git-path` derivation, and static-check menu mutation flows.
|
|
381
400
|
- `tests/prompt-rendering.test.ts` covers home-resource synchronization and placeholder replacement in rendered prompts.
|
|
382
|
-
- `tests/oracle-standalone.test.ts` compares standalone `files-*`
|
|
383
|
-
- `tests/oracle-project.test.ts` compares project-scoped commands against the Python oracle
|
|
401
|
+
- `tests/oracle-standalone.test.ts` compares standalone `files-*` outputs against the Python `usereq.cli` oracle and compares `--test-static-check` dummy/command outputs against archived fixtures.
|
|
402
|
+
- `tests/oracle-project.test.ts` compares unchanged project-scoped commands against the Python oracle, verifies archived `files-static-check` and `static-check` outputs, and separately verifies worktree create/delete side effects.
|
|
384
403
|
- `tests/release-workflow.test.ts` verifies semver-tag gating, npm publication steps, and GitHub release creation directives in `.github/workflows/release-npm.yml`.
|
|
385
404
|
- Test business logic focuses on parity with the Python oracle, persistent config mutation, startup-tool activation, worktree lifecycle correctness, and npm release workflow structure.
|
|
386
405
|
|
|
@@ -410,7 +429,7 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
410
429
|
| DES-001 | `src/cli.ts` :: `parseArgs` and `main` :: parses flags then dispatches with branches such as `runReferences`, `runCompress`, `runFind`, `runProjectStaticCheck`, and `runStaticCheck`. |
|
|
411
430
|
| DES-002 | `src/index.ts` :: `piUsereqExtension` :: calls `registerPromptCommands`, `registerToolWrapperCommands`, `registerAgentTools`, `registerConfigCommands`, then installs `pi.on("session_start", ...)`. |
|
|
412
431
|
| DES-003 | `src/core/source-analyzer.ts` :: `class SourceElement`; `SourceAnalyzer.enrich` :: invokes `extractSignatures`, `detectHierarchy`, `extractVisibility`, `extractInheritance`, `extractBodyAnnotations`, and `extractDoxygenFields`. |
|
|
413
|
-
| DES-004 | `src/core/static-check.ts` ::
|
|
432
|
+
| DES-004 | `src/core/static-check.ts` :: `StaticCheckBase` and `StaticCheckCommand`; `dispatchStaticCheckForFile` switch selects the modular implementation by module name. |
|
|
414
433
|
| DES-005 | `src/core/tool-runner.ts` :: exports `runFilesTokens`, `runReferences`, `runCompress`, `runFind`, `runProjectStaticCheck`, `runGitCheck`, `runDocsCheck`, `runGitWt*`, `runGitPath`, `runGetBasePath`. |
|
|
415
434
|
| DES-006 | `src/core/compress-files.ts` :: `parts.push(\`@@@ ${outputPath} | ${language}\n> Lines: ...\`)`; `src/core/find-constructs.ts` :: `const header = \`@@@ ${filePath} | ${language}\``. |
|
|
416
435
|
| DES-011 | `.github/workflows/release-npm.yml` :: release jobs validate semver tags and `origin/master`, publish with npm authentication, and create the GitHub Release. |
|
|
@@ -425,7 +444,9 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
425
444
|
| REQ-005 | `src/index.ts` :: `runToolCommand`, `formatResultForEditor`, `showToolResult` :: writes combined output into the editor and notifies `completed` or `failed`. |
|
|
426
445
|
| REQ-006 | `src/index.ts` :: `configurePiUsereq` :: edits docs/tests/src settings, invokes submenus, resets defaults, and persists with `saveProjectConfig`. |
|
|
427
446
|
| REQ-007 | `src/index.ts` :: `configurePiUsereqToolsMenu` :: choices include `Show tool status`, `Toggle tool`, `Enable all`, `Disable all`, `Reset ... defaults`. |
|
|
428
|
-
| REQ-008 | `src/index.ts` :: `configureStaticCheckMenu` :: supports guided
|
|
447
|
+
| REQ-008 | `src/index.ts` :: `configureStaticCheckMenu` :: supports Command-only guided addition, raw-spec addition, language removal, and supported-language display. |
|
|
448
|
+
| REQ-160 | `src/index.ts` :: `buildStaticCheckMenuChoices` and `configureStaticCheckMenu` :: omit user-facing module selection and hardcode `Command` for guided additions. |
|
|
449
|
+
| REQ-161 | `src/core/static-check.ts` :: `dispatchStaticCheckForFile` and `runStaticCheck` :: keep `Dummy` only for existing config entries and the debug driver. |
|
|
429
450
|
| REQ-009 | `src/index.ts` :: `pi.on("session_start", ...)` :: calls `ensureHomeResources()`, `applyConfiguredPiUsereqTools`, and `ctx.ui.setStatus(...)`. |
|
|
430
451
|
| REQ-010 | `src/core/token-counter.ts` :: `new TokenCounter("cl100k_base")`; `formatPackSummary`; `src/core/tool-runner.ts` :: `runFilesTokens` validates files and returns summary plus warnings. |
|
|
431
452
|
| REQ-011 | `src/core/reference-payload.ts` :: `buildReferenceToolPayload` :: emits explicit-file JSON with per-file metadata, imports, symbol records, and structured comments/Doxygen fields. |
|
|
@@ -435,11 +456,11 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
435
456
|
| REQ-015 | `src/core/tool-runner.ts` :: `runCompress` :: collects configured project files then returns `compressFiles(files, enableLineNumbers, verbose, base)`. |
|
|
436
457
|
| REQ-016 | `src/core/tool-runner.ts` :: `runFind` :: collects configured project files and executes `findConstructsInFiles(files, tagFilter, pattern, ...)`. |
|
|
437
458
|
| REQ-017 | `src/core/tool-runner.ts` :: `runTokens` :: `canonicalNames = ["REQUIREMENTS.md", "WORKFLOW.md", "REFERENCES.md"]` and fails if no canonical docs exist. |
|
|
438
|
-
| REQ-018 | `src/cli.ts` :: `if (args.testStaticCheck) return runStaticCheck(args.testStaticCheck)`; `src/
|
|
459
|
+
| REQ-018 | `src/cli.ts` :: `if (args.testStaticCheck) return runStaticCheck(args.testStaticCheck)`; `src/core/static-check.ts` :: `runStaticCheck` supports `dummy` and `command`. |
|
|
439
460
|
| REQ-019 | `src/core/tool-runner.ts` :: `runFilesStaticCheck` :: resolves extension via `STATIC_CHECK_EXT_TO_LANG`, iterates configured checkers, and calls `dispatchStaticCheckForFile(..., { failOnly: true })`. |
|
|
440
|
-
| REQ-020 | `src/core/static-check.ts` :: `parseEnableStaticCheck` :: parses `LANG=
|
|
441
|
-
| REQ-021 | `src/core/static-check.ts` :: `parseEnableStaticCheck` :: explicit `ReqError` branches
|
|
442
|
-
| REQ-022 | `src/core/
|
|
461
|
+
| REQ-020 | `src/core/static-check.ts` :: `parseEnableStaticCheck` :: parses `LANG=Command,CMD[,PARAM...]`, canonicalizes language names, and builds `StaticCheckEntry`. |
|
|
462
|
+
| REQ-021 | `src/core/static-check.ts` :: `parseEnableStaticCheck` :: explicit `ReqError` branches reject missing `=`, missing `Command`, missing `cmd`, unknown language, and non-Command modules. |
|
|
463
|
+
| REQ-022 | `src/core/config.ts` :: `loadConfig` preserves persisted entries; `src/core/static-check.ts` :: `dispatchStaticCheckForFile` and `runStaticCheck` keep `Dummy` available only for existing config or debug-driver use. |
|
|
443
464
|
| REQ-023 | `src/core/static-check.ts` :: `StaticCheckCommand` constructor :: `if (!findExecutable(cmd)) throw new ReqError(...)`. |
|
|
444
465
|
| REQ-024 | `src/core/tool-runner.ts` :: `runGitCheck` :: bash command requires worktree membership, empty `git status --porcelain`, and symbolic or detached `HEAD`. |
|
|
445
466
|
| REQ-025 | `src/core/tool-runner.ts` :: `runDocsCheck` :: maps missing docs files to `/req-write`, `/req-workflow`, and `/req-references` prompt guidance. |
|
|
@@ -459,9 +480,10 @@ PI-useReq is a TypeScript pi extension plus companion Node CLI and standalone ex
|
|
|
459
480
|
| --- | --- |
|
|
460
481
|
| TST-001 | `tests/extension-registration.test.ts` :: `extension registers all required prompt commands, tool wrappers, and agent tools` validates command and tool registration sets. |
|
|
461
482
|
| TST-002 | `tests/prompt-rendering.test.ts` :: `embedded resources are copied ...` and `prompt rendering replaces all dynamic placeholders ...`. |
|
|
462
|
-
| TST-003 | `tests/oracle-standalone.test.ts` ::
|
|
463
|
-
| TST-004 | `tests/oracle-project.test.ts` ::
|
|
464
|
-
| TST-005 | `tests/extension-registration.test.ts` :: `configuration menu saves updated docs-dir`, `configuration menu can disable ... tools`, and both static-check menu addition tests. |
|
|
483
|
+
| TST-003 | `tests/oracle-standalone.test.ts` :: preserves Python-oracle coverage for `files-tokens`, `files-compress`, and `files-find`; `tests/attended-results-scenarios.ts` :: archives `test-static-check` dummy and command scenarios only. |
|
|
484
|
+
| TST-004 | `tests/oracle-project.test.ts` :: preserves Python-oracle coverage for `compress`, `find`, `tokens`, `git-check`, `docs-check`, `git-path`, and `get-base-path`; `tests/attended-results-scenarios.ts` :: archives `files-static-check` and `static-check`. |
|
|
485
|
+
| TST-005 | `tests/extension-registration.test.ts` :: `configuration menu saves updated docs-dir`, `configuration menu can disable ... tools`, and both Command-oriented static-check menu addition tests. |
|
|
486
|
+
| TST-046 | `tests/extension-registration.test.ts` :: `configuration menu hides removed static-check modules from user-facing actions`. |
|
|
465
487
|
| TST-006 | `tests/extension-registration.test.ts` :: `session_start applies configured pi-usereq startup tools`. |
|
|
466
488
|
| TST-007 | `tests/extension-registration.test.ts` :: `git-path dependent commands derive the repository root at runtime`. |
|
|
467
489
|
| TST-008 | `tests/oracle-project.test.ts` :: `git worktree create/delete wrappers produce expected worktree side effects`. |
|