cli-usereq 0.75.11__tar.gz → 0.75.22__tar.gz

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.
Files changed (49) hide show
  1. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/PKG-INFO +19 -8
  2. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/README.md +17 -7
  3. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/pyproject.toml +2 -1
  4. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/__init__.py +1 -1
  5. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/cli.py +300 -145
  6. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/compress.py +20 -32
  7. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/compress_files.py +12 -22
  8. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/config_cli.py +39 -8
  9. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/config_schema.py +77 -6
  10. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/find_constructs.py +20 -78
  11. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/analyze.md +25 -52
  12. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/change.md +26 -51
  13. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/check.md +21 -47
  14. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/cover.md +26 -51
  15. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/create.md +12 -8
  16. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/fix.md +26 -52
  17. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/flowchart.md +19 -47
  18. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/implement.md +25 -13
  19. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/new.md +29 -55
  20. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/orchestrate.md +24 -18
  21. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/readme.md +22 -48
  22. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/recreate.md +20 -48
  23. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/refactor.md +28 -52
  24. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/references.md +14 -9
  25. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/renumber.md +14 -9
  26. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/workflow.md +39 -49
  27. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/prompts/write.md +13 -7
  28. cli_usereq-0.75.22/src/usereq/resources/prompts-version.txt +1 -0
  29. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/static_check.py +392 -6
  30. cli_usereq-0.75.22/src/usereq/table_style.py +153 -0
  31. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/uv.lock +61 -1
  32. cli_usereq-0.75.11/src/usereq/resources/prompts-version.txt +0 -1
  33. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/LICENSE +0 -0
  34. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/MANIFEST.in +0 -0
  35. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/setup.cfg +0 -0
  36. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/setup.py +0 -0
  37. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/__main__.py +0 -0
  38. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/doxygen_parser.py +0 -0
  39. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/generate_markdown.py +0 -0
  40. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/guidelines/Google_C++_Style_Guide.md +0 -0
  41. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/guidelines/Google_Python_Style_Guide.md +0 -0
  42. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/guidelines/Google_TypeScript_Style_Guide.md +0 -0
  43. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/guidelines/RFC2119.md +0 -0
  44. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/templates/Agentic_Text_Authoring_Guidance.md +0 -0
  45. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/templates/Document_Source_Code_in_Doxygen_Style.md +0 -0
  46. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/templates/HDT_Test_Authoring_Guide.md +0 -0
  47. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/resources/templates/Requirements_Template.md +0 -0
  48. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/source_analyzer.py +0 -0
  49. {cli_usereq-0.75.11 → cli_usereq-0.75.22}/src/usereq/token_counter.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cli-usereq
3
- Version: 0.75.11
3
+ Version: 0.75.22
4
4
  Summary: Initialize a project with prompts, agents, and templates from the useReq repository.
5
5
  Author: Ogekuri
6
6
  License-Expression: GPL-3.0-only
@@ -20,6 +20,7 @@ Requires-Dist: tiktoken
20
20
  Requires-Dist: pyyaml
21
21
  Requires-Dist: ruff
22
22
  Requires-Dist: pyright
23
+ Requires-Dist: bandit
23
24
  Dynamic: license-file
24
25
 
25
26
  > [!CAUTION]
@@ -34,7 +35,7 @@ Dynamic: license-file
34
35
  > * **No Support or Feature Requests:** Please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage of development.
35
36
  > * **No Warranty:** This software is provided **"AS IS"**, without warranty of any kind, express or implied. You may use it strictly for **testing and evaluation purposes** at your own sole risk.
36
37
 
37
- # useReq / req (0.75.11)
38
+ # useReq / req (0.75.22)
38
39
 
39
40
  <p align="center">
40
41
  <img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
@@ -276,11 +277,21 @@ Each stored entry exposes the fields `module`, `cmd`, and `params` as writable c
276
277
 
277
278
  A standalone testbed is available: `req --test-static-check {dummy,pylance,ruff,command <cmd>} [FILES...]`, where `[FILES]` may be files, directories (direct children only), or glob patterns including `**` recursive expansion.
278
279
 
280
+ ### Static-check installation audit
281
+
282
+ ```bash
283
+ req audit # audit static-check tool installation; --prj-base is optional
284
+ ```
285
+
286
+ - `req audit` loads the configured static-check entries from `~/.config/usereq/config.json` (applying the default static-check configuration when the `"static-check"` key is absent) and prints exactly one table with the `Language`, `Static-Check`, and `Installed` columns, one row per configured `Command` entry. Only static-checks of type `Command` (external executables invoked as commands) are audited; internally implemented modules (`Dummy`, `Pylance`, `Ruff`) run through the active Python interpreter and are not audited.
287
+ - Rows are grouped by canonical language in alphabetical order; entries of the same language keep their persisted insertion order. The `Static-Check` cell shows the external binary name (the entry's `cmd` token, for example `cppcheck`); the `Installed` cell shows `yes` or `no` according to a `PATH` lookup of that binary.
288
+ - `--prj-base` is optional: the command runs without it; when provided, it is validated and used as the project-base context of the audit. The audit never executes any checker, so unavailable tools are reported in the table without changing the exit code (always 0).
289
+
279
290
  ## Command Reference
280
291
 
281
292
  `req` can be run from any directory. Two path arguments drive location resolution:
282
293
 
283
- - `--prj-base <project-folder>` — mandatory for commands that read or write project files (`--docs-check`, `--set-*-dir`, and the project-scan subcommands `tokens`, `references`, `compress`, `find`, `static-check`, `files-static-check`); the `install` subcommand neither requires nor accepts it.
294
+ - `--prj-base <project-folder>` — mandatory for commands that read or write project files (`--docs-check`, `--set-*-dir`, and the project-scan subcommands `tokens`, `references`, `compress`, `find`, `static-check`, `files-static-check`); the `install` subcommand neither requires nor accepts it, while `audit` accepts it as optional context.
284
295
  - `--git-base <git-repository-folder>` — mandatory for the git commands (`--git-check`, `--git-wt-name`, `--git-wt-create`, `--git-wt-delete`); not required by any analysis subcommand.
285
296
  - `--prj-base` and `--git-base` are never persisted in `~/.config/usereq/config.json`.
286
297
  - The configuration commands `--print`, `--info`, `--print-raw`, `--get`, `--set`, and `--unset` require neither base argument; paths are resolved from the configuration schema, not from a project.
@@ -293,18 +304,18 @@ The analysis commands are bare subcommands (no `--` prefix); the project-scan on
293
304
  | --- | --- |
294
305
  | `files-tokens FILE [FILE ...]` | Count tokens and chars for the given files |
295
306
  | `files-references FILE [FILE ...]` | Generate LLM reference markdown for the given files |
296
- | `files-compress [--enable-line-numbers] FILE [FILE ...]` | Generate compressed output for the given files |
297
- | `files-find [--enable-line-numbers] TAG PATTERN FILE [FILE ...]` | Find and extract specific constructs from the given files |
307
+ | `files-compress FILE [FILE ...]` | Generate compressed output for the given files (lines prefixed with original `<n>:` line numbers) |
308
+ | `files-find TAG PATTERN FILE [FILE ...]` | Find and extract specific constructs from the given files (as-is code, lines prefixed with original `<n>:` line numbers) |
298
309
  | `files-static-check --prj-base P FILE [FILE ...]` | Run static analysis on the given files |
299
310
  | `tokens --prj-base P` | Count tokens/chars for canonical docs (`REQUIREMENTS.md`, `WORKFLOW.md`, `REFERENCES.md`) in configured `docs-dir` |
300
311
  | `references --prj-base P` | Reference markdown for source files selected by `git ls-files --cached --others --exclude-standard` under configured `src-dir` |
301
- | `compress --prj-base P [--enable-line-numbers]` | Compressed output for the same project selection |
302
- | `find --prj-base P [--enable-line-numbers] TAG PATTERN` | Extract constructs from the same project selection |
312
+ | `compress --prj-base P` | Compressed output for the same project selection (lines prefixed with original `<n>:` line numbers) |
313
+ | `find --prj-base P TAG PATTERN` | Extract constructs from the same project selection (as-is code, lines prefixed with original `<n>:` line numbers) |
303
314
  | `static-check --prj-base P` | Static analysis on `src-dir` + `tests-dir` selections (excluding `fixtures/`) |
304
315
 
305
316
  Notes:
306
317
 
307
- - Add `--enable-line-numbers` (accepted before or after the subcommand token) to include `<n>:` prefixes in `files-compress`, `compress`, `files-find`, and `find` output.
318
+ - `files-compress`, `compress`, `files-find`, and `find` always prefix code lines with `<n>:` original source line numbers; no option is needed or available (`--enable-line-numbers` is not accepted). `compress`/`files-compress` strip comments and blank lines; `find`/`files-find` emit extracted construct code as-is, preserving comments.
308
319
  - `files-static-check` and `static-check` exit with code 0 when all checked files pass (or none are checked) and 1 when at least one file fails; passing checks produce no output (`fail_only` mode).
309
320
  - `static-check` includes files from both `src-dir` and `tests-dir`; if `tests-dir` is missing or invalid, test-directory inclusion is skipped without error.
310
321
 
@@ -10,7 +10,7 @@
10
10
  > * **No Support or Feature Requests:** Please **do not** open issues, bug reports, or feature requests. They will not be addressed or accepted at this stage of development.
11
11
  > * **No Warranty:** This software is provided **"AS IS"**, without warranty of any kind, express or implied. You may use it strictly for **testing and evaluation purposes** at your own sole risk.
12
12
 
13
- # useReq / req (0.75.11)
13
+ # useReq / req (0.75.22)
14
14
 
15
15
  <p align="center">
16
16
  <img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
@@ -252,11 +252,21 @@ Each stored entry exposes the fields `module`, `cmd`, and `params` as writable c
252
252
 
253
253
  A standalone testbed is available: `req --test-static-check {dummy,pylance,ruff,command <cmd>} [FILES...]`, where `[FILES]` may be files, directories (direct children only), or glob patterns including `**` recursive expansion.
254
254
 
255
+ ### Static-check installation audit
256
+
257
+ ```bash
258
+ req audit # audit static-check tool installation; --prj-base is optional
259
+ ```
260
+
261
+ - `req audit` loads the configured static-check entries from `~/.config/usereq/config.json` (applying the default static-check configuration when the `"static-check"` key is absent) and prints exactly one table with the `Language`, `Static-Check`, and `Installed` columns, one row per configured `Command` entry. Only static-checks of type `Command` (external executables invoked as commands) are audited; internally implemented modules (`Dummy`, `Pylance`, `Ruff`) run through the active Python interpreter and are not audited.
262
+ - Rows are grouped by canonical language in alphabetical order; entries of the same language keep their persisted insertion order. The `Static-Check` cell shows the external binary name (the entry's `cmd` token, for example `cppcheck`); the `Installed` cell shows `yes` or `no` according to a `PATH` lookup of that binary.
263
+ - `--prj-base` is optional: the command runs without it; when provided, it is validated and used as the project-base context of the audit. The audit never executes any checker, so unavailable tools are reported in the table without changing the exit code (always 0).
264
+
255
265
  ## Command Reference
256
266
 
257
267
  `req` can be run from any directory. Two path arguments drive location resolution:
258
268
 
259
- - `--prj-base <project-folder>` — mandatory for commands that read or write project files (`--docs-check`, `--set-*-dir`, and the project-scan subcommands `tokens`, `references`, `compress`, `find`, `static-check`, `files-static-check`); the `install` subcommand neither requires nor accepts it.
269
+ - `--prj-base <project-folder>` — mandatory for commands that read or write project files (`--docs-check`, `--set-*-dir`, and the project-scan subcommands `tokens`, `references`, `compress`, `find`, `static-check`, `files-static-check`); the `install` subcommand neither requires nor accepts it, while `audit` accepts it as optional context.
260
270
  - `--git-base <git-repository-folder>` — mandatory for the git commands (`--git-check`, `--git-wt-name`, `--git-wt-create`, `--git-wt-delete`); not required by any analysis subcommand.
261
271
  - `--prj-base` and `--git-base` are never persisted in `~/.config/usereq/config.json`.
262
272
  - The configuration commands `--print`, `--info`, `--print-raw`, `--get`, `--set`, and `--unset` require neither base argument; paths are resolved from the configuration schema, not from a project.
@@ -269,18 +279,18 @@ The analysis commands are bare subcommands (no `--` prefix); the project-scan on
269
279
  | --- | --- |
270
280
  | `files-tokens FILE [FILE ...]` | Count tokens and chars for the given files |
271
281
  | `files-references FILE [FILE ...]` | Generate LLM reference markdown for the given files |
272
- | `files-compress [--enable-line-numbers] FILE [FILE ...]` | Generate compressed output for the given files |
273
- | `files-find [--enable-line-numbers] TAG PATTERN FILE [FILE ...]` | Find and extract specific constructs from the given files |
282
+ | `files-compress FILE [FILE ...]` | Generate compressed output for the given files (lines prefixed with original `<n>:` line numbers) |
283
+ | `files-find TAG PATTERN FILE [FILE ...]` | Find and extract specific constructs from the given files (as-is code, lines prefixed with original `<n>:` line numbers) |
274
284
  | `files-static-check --prj-base P FILE [FILE ...]` | Run static analysis on the given files |
275
285
  | `tokens --prj-base P` | Count tokens/chars for canonical docs (`REQUIREMENTS.md`, `WORKFLOW.md`, `REFERENCES.md`) in configured `docs-dir` |
276
286
  | `references --prj-base P` | Reference markdown for source files selected by `git ls-files --cached --others --exclude-standard` under configured `src-dir` |
277
- | `compress --prj-base P [--enable-line-numbers]` | Compressed output for the same project selection |
278
- | `find --prj-base P [--enable-line-numbers] TAG PATTERN` | Extract constructs from the same project selection |
287
+ | `compress --prj-base P` | Compressed output for the same project selection (lines prefixed with original `<n>:` line numbers) |
288
+ | `find --prj-base P TAG PATTERN` | Extract constructs from the same project selection (as-is code, lines prefixed with original `<n>:` line numbers) |
279
289
  | `static-check --prj-base P` | Static analysis on `src-dir` + `tests-dir` selections (excluding `fixtures/`) |
280
290
 
281
291
  Notes:
282
292
 
283
- - Add `--enable-line-numbers` (accepted before or after the subcommand token) to include `<n>:` prefixes in `files-compress`, `compress`, `files-find`, and `find` output.
293
+ - `files-compress`, `compress`, `files-find`, and `find` always prefix code lines with `<n>:` original source line numbers; no option is needed or available (`--enable-line-numbers` is not accepted). `compress`/`files-compress` strip comments and blank lines; `find`/`files-find` emit extracted construct code as-is, preserving comments.
284
294
  - `files-static-check` and `static-check` exit with code 0 when all checked files pass (or none are checked) and 1 when at least one file fails; passing checks produce no output (`fail_only` mode).
285
295
  - `static-check` includes files from both `src-dir` and `tests-dir`; if `tests-dir` is missing or invalid, test-directory inclusion is skipped without error.
286
296
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cli-usereq"
7
- version = "0.75.11"
7
+ version = "0.75.22"
8
8
  description = "Initialize a project with prompts, agents, and templates from the useReq repository."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -15,6 +15,7 @@ dependencies = [
15
15
  "pyyaml",
16
16
  "ruff",
17
17
  "pyright",
18
+ "bandit",
18
19
  ]
19
20
  authors = [
20
21
  { name = "Ogekuri" }
@@ -18,7 +18,7 @@ from . import source_analyzer # usereq.source_analyzer submodule
18
18
  from . import token_counter # usereq.token_counter submodule
19
19
  from typing import Any
20
20
 
21
- __version__ = "0.75.11"
21
+ __version__ = "0.75.22"
22
22
  """! @brief Semantic version string of the package."""
23
23
 
24
24