cli-usereq 0.75.3__tar.gz → 0.75.7__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 (77) hide show
  1. cli_usereq-0.75.7/MANIFEST.in +6 -0
  2. cli_usereq-0.75.7/PKG-INFO +457 -0
  3. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/README.md +1 -1
  4. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/pyproject.toml +14 -5
  5. cli_usereq-0.75.7/setup.py +36 -0
  6. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/__init__.py +1 -1
  7. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/cli.py +158 -49
  8. cli_usereq-0.75.7/src/usereq/config_cli.py +1362 -0
  9. cli_usereq-0.75.7/src/usereq/config_schema.py +336 -0
  10. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/analyze.md +6 -5
  11. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/fix.md +1 -1
  12. cli_usereq-0.75.7/src/usereq/resources/prompts-version.txt +1 -0
  13. cli_usereq-0.75.7/uv.lock +475 -0
  14. cli_usereq-0.75.3/PKG-INFO +0 -1132
  15. cli_usereq-0.75.3/src/cli_usereq.egg-info/PKG-INFO +0 -1132
  16. cli_usereq-0.75.3/src/cli_usereq.egg-info/SOURCES.txt +0 -68
  17. cli_usereq-0.75.3/src/cli_usereq.egg-info/dependency_links.txt +0 -1
  18. cli_usereq-0.75.3/src/cli_usereq.egg-info/entry_points.txt +0 -4
  19. cli_usereq-0.75.3/src/cli_usereq.egg-info/requires.txt +0 -5
  20. cli_usereq-0.75.3/src/cli_usereq.egg-info/top_level.txt +0 -1
  21. cli_usereq-0.75.3/src/usereq/resources/prompts-version.txt +0 -1
  22. cli_usereq-0.75.3/tests/test_analyzer_cli.py +0 -162
  23. cli_usereq-0.75.3/tests/test_analyzer_comments.py +0 -155
  24. cli_usereq-0.75.3/tests/test_analyzer_core.py +0 -201
  25. cli_usereq-0.75.3/tests/test_analyzer_errors.py +0 -173
  26. cli_usereq-0.75.3/tests/test_analyzer_format.py +0 -185
  27. cli_usereq-0.75.3/tests/test_analyzer_helpers.py +0 -253
  28. cli_usereq-0.75.3/tests/test_cli.py +0 -2112
  29. cli_usereq-0.75.3/tests/test_compress.py +0 -238
  30. cli_usereq-0.75.3/tests/test_dependency_manifests.py +0 -415
  31. cli_usereq-0.75.3/tests/test_doxygen_parser.py +0 -513
  32. cli_usereq-0.75.3/tests/test_files_commands.py +0 -2082
  33. cli_usereq-0.75.3/tests/test_find_constructs.py +0 -390
  34. cli_usereq-0.75.3/tests/test_find_constructs_comprehensive.py +0 -756
  35. cli_usereq-0.75.3/tests/test_generate_markdown.py +0 -122
  36. cli_usereq-0.75.3/tests/test_helpers.py +0 -371
  37. cli_usereq-0.75.3/tests/test_import_isolation.py +0 -61
  38. cli_usereq-0.75.3/tests/test_pre_release_check.py +0 -245
  39. cli_usereq-0.75.3/tests/test_release_workflow.py +0 -340
  40. cli_usereq-0.75.3/tests/test_source_analyzer.py +0 -780
  41. cli_usereq-0.75.3/tests/test_static_check.py +0 -2104
  42. cli_usereq-0.75.3/tests/test_token_counter.py +0 -150
  43. cli_usereq-0.75.3/tests/test_update_check.py +0 -875
  44. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/LICENSE +0 -0
  45. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/setup.cfg +0 -0
  46. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/__main__.py +0 -0
  47. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/compress.py +0 -0
  48. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/compress_files.py +0 -0
  49. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/doxygen_parser.py +0 -0
  50. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/find_constructs.py +0 -0
  51. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/generate_markdown.py +0 -0
  52. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/guidelines/Google_C++_Style_Guide.md +0 -0
  53. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/guidelines/Google_Python_Style_Guide.md +0 -0
  54. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/guidelines/Google_TypeScript_Style_Guide.md +0 -0
  55. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/guidelines/RFC2119.md +0 -0
  56. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/change.md +0 -0
  57. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/check.md +0 -0
  58. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/cover.md +0 -0
  59. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/create.md +0 -0
  60. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/flowchart.md +0 -0
  61. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/implement.md +0 -0
  62. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/new.md +0 -0
  63. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/orchestrate.md +0 -0
  64. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/readme.md +0 -0
  65. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/recreate.md +0 -0
  66. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/refactor.md +0 -0
  67. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/references.md +0 -0
  68. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/renumber.md +0 -0
  69. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/workflow.md +0 -0
  70. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/prompts/write.md +0 -0
  71. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/templates/Agentic_Text_Authoring_Guidance.md +0 -0
  72. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/templates/Document_Source_Code_in_Doxygen_Style.md +0 -0
  73. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/templates/HDT_Test_Authoring_Guide.md +0 -0
  74. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/resources/templates/Requirements_Template.md +0 -0
  75. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/source_analyzer.py +0 -0
  76. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/static_check.py +0 -0
  77. {cli_usereq-0.75.3 → cli_usereq-0.75.7}/src/usereq/token_counter.py +0 -0
@@ -0,0 +1,6 @@
1
+ # Exclude the generated setuptools build intermediate from the source distribution.
2
+ prune src/*.egg-info
3
+ # Exclude the non-runtime test suite from the source distribution (SRS-274 scope is src/usereq/resources only).
4
+ prune tests
5
+ # Ship the canonical lockfile so the source distribution can be rebuilt reproducibly (SRS-055).
6
+ include uv.lock
@@ -0,0 +1,457 @@
1
+ Metadata-Version: 2.4
2
+ Name: cli-usereq
3
+ Version: 0.75.7
4
+ Summary: Initialize a project with prompts, agents, and templates from the useReq repository.
5
+ Author: Ogekuri
6
+ License-Expression: GPL-3.0-only
7
+ Project-URL: Homepage, https://github.com/Ogekuri/CLI-useReq
8
+ Project-URL: Repository, https://github.com/Ogekuri/CLI-useReq
9
+ Keywords: astral,uv,project,prompts,templates
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Code Generators
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: tiktoken
20
+ Requires-Dist: pyyaml
21
+ Requires-Dist: ruff
22
+ Requires-Dist: pyright
23
+ Dynamic: license-file
24
+
25
+ > [!CAUTION]
26
+ > ### 🚨 STRICTLY EXPERIMENTAL — PROOF OF CONCEPT (PRE-ALPHA)
27
+ >
28
+ > ![Status: Proof of Concept](https://img.shields.io/badge/Status-Proof_of_Concept-red?style=flat-square) ![Stage: Pre-Alpha](https://img.shields.io/badge/Stage-Pre--Alpha-critical?style=flat-square) ![Maintenance: Personal Use Only](https://img.shields.io/badge/Scope-Personal_Use_Only-important?style=flat-square) ![Issues: Closed](https://img.shields.io/badge/Issues_%26_PRs-Not_Accepted-inactive?style=flat-square)
29
+ >
30
+ > **PLEASE READ CAREFULLY BEFORE USING THIS SOFTWARE:**
31
+ >
32
+ > * **Very Early Stage:** This project is currently a raw **Proof of Concept (PoC)** in a **pre-alpha** state. It is nowhere near production-ready and may contain severe bugs, breaking changes, or incomplete logic.
33
+ > * **Personal Use Only:** This repository is developed, maintained, and shared strictly for **personal use**.
34
+ > * **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
+ > * **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
+ # useReq / req (0.75.7)
38
+
39
+ <p align="center">
40
+ <img src="https://img.shields.io/badge/python-3.11%2B-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python 3.11+">
41
+ <img src="https://img.shields.io/badge/license-GPL--3.0-491?style=flat-square" alt="License: GPL-3.0">
42
+ <img src="https://img.shields.io/badge/platform-Linux-6A7EC2?style=flat-square&logo=terminal&logoColor=white" alt="Platforms">
43
+ <img src="https://img.shields.io/badge/docs-live-b31b1b" alt="Docs">
44
+ <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv">
45
+ </p>
46
+
47
+ <p align="center">
48
+ <strong>The `req` CLI provisions requirements-driven development skills for LLM agents.</strong><br>
49
+ In more detail: useReq packages a catalog of requirements-engineering prompts (write, create, change, implement, check, and more) and installs them as user-level skills for the CLIs and agents you already use — exposed as `/skill:req-<name>` or `$req-<name>` depending on the provider. It also ships an embedded source-analysis toolkit (token counting, references, compression, construct extraction, static checks) that operates on your project across 20 programming languages, plus git-worktree helpers for parallel task execution. Everything is driven by one user-global configuration file (`~/.config/usereq/config.json`); nothing is written into your project repository. It runs as a Python package (installed as `req` or `usereq`) or directly via `uvx`.
50
+ </p>
51
+
52
+ <p align="center">
53
+ <a href="#feature-highlights">Feature Highlights</a> |
54
+ <a href="#quick-start">Quick Start</a> |
55
+ <a href="#requirements">Requirements</a> |
56
+ <a href="#users-guide">User's Guide</a> |
57
+ <a href="#acknowledgments">Acknowledgments</a>
58
+ </p>
59
+
60
+ <p align="center">
61
+ 🚧 <strong>STAGE:</strong> PRE-ALPHA 📝 - Proof-of-Concept (PoC) version 🏗️ 🚧<br>
62
+ ⚠️ <strong>IMPORTANT NOTICE</strong>: Created with <a href="https://www.npmjs.com/package/pi-usereq"><strong>PI-useReq/pi-usereq</strong></a> 🤖✨ ⚠️<br>
63
+ </p>
64
+
65
+ # Feature Highlights
66
+
67
+ The highlights below are what give the most value day-to-day:
68
+
69
+ - **Drives development through requirement changes**, keeping the work under control with an uninterrupted linear progression.
70
+ - **One catalog, many CLIs**: a single skill catalog published to pi.dev, Antigravity, Claude Code, OpenAI Codex, OpenClaw, and OpenCode through a common interface.
71
+ - **LLM-optimized documentation**: creates and maintains a *Software Requirements Specification* (SRS) plus `WORKFLOW.md`, `REFERENCES.md`, and `FLOWCHART.md` for new or existing projects, tuned for LLM-agent reasoning.
72
+ - **Embedded source analysis** for 20 languages (Python, C, C++, C#, Rust, JavaScript, TypeScript, Java, Go, Ruby, PHP, Swift, Kotlin, Scala, Lua, Shell, Perl, Haskell, Zig, Elixir): token counting, reference markdown, compression, and construct extraction.
73
+ - **Configurable static analysis** with Pylance, Ruff, or arbitrary Command-Line checkers — sensible defaults included, with per-checker pre-flight validation that never blocks the run.
74
+ - **Declarative provider configuration**: enable/disable providers and static checkers in one global config; `install`/`uninstall`/`show` lifecycle subcommands report exactly what is deployed where.
75
+ - **Self-maintaining**: optional auto-install re-provisions your providers after every self-upgrade.
76
+ - **Git worktree support** to parallelize tasks on clean repositories.
77
+ - Compatible with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) and [release-changelog-builder-action](https://github.com/mikepenz/release-changelog-builder-action); integrates with [G/Git-Alias CLI](https://github.com/Ogekuri/G).
78
+
79
+ # Quick Start
80
+
81
+ Get running in three steps: install the tool, configure one provider, and install the artifacts into your CLI.
82
+
83
+ **1. Install** (pick one):
84
+
85
+ ```bash
86
+ # persistent install from PyPI (recommended)
87
+ uv tool install cli-usereq
88
+
89
+ # or persistent install tracking the git repository
90
+ uv tool install cli-usereq --force --refresh --from git+https://github.com/Ogekuri/CLI-useReq.git
91
+
92
+ # or run instantly without installing (PyPI release)
93
+ uvx --from cli-usereq req --help
94
+
95
+ # or run instantly without installing (git repository)
96
+ uvx --from git+https://github.com/Ogekuri/CLI-useReq.git req --help
97
+ ```
98
+
99
+ **2. Configure** — enable a provider by name (configuration only; nothing is installed yet, all providers are disabled by default):
100
+
101
+ ```bash
102
+ req --enable pi
103
+ ```
104
+
105
+ **3. Run** — install the skills for the configured providers:
106
+
107
+ ```bash
108
+ req install
109
+ ```
110
+
111
+ Skills are installed under your HOME (e.g. `~/.pi/agent/skills/` for the `pi` provider) and are immediately available as `/skill:req-<name>` skills. Start with `/req-write` to draft the SRS of a new project, or `/req-create` to derive it from existing source code; then drive implementation with `/req-implement`, `/req-change`, and `/req-new`.
112
+
113
+ <!-- Legacy section anchor retained for SRS-342 tooling: ## Requirements -->
114
+ # Requirements
115
+
116
+ - **Astral `uv` tool is required** to run `scripts/req.sh` and is the recommended workflow for all project CLI executions. Install it from [https://docs.astral.sh/uv/getting-started/installation/](https://docs.astral.sh/uv/getting-started/installation/).
117
+ - **Python 3.11+**.
118
+ - **git** — required by project-scan commands (`references`, `compress`, `find`, `static-check`) and by the git-integration commands.
119
+ - **Primary validated environment: Linux** — automatic `--upgrade` and `--uninstall` execution is Linux-only; on other platforms the manual command is printed instead.
120
+ - `uv.lock` is the canonical dependency lockfile for this repository; no root `requirements.txt` is maintained.
121
+ - Optional external binaries for the default static-check configuration: `cppcheck` and `clang-format` (C/C++), `node` (JavaScript), `eslint` (TypeScript). Python checking uses the bundled `Pylance` (pyright) and `Ruff` modules. Missing binaries are reported per check and never abort the run.
122
+
123
+ # User's Guide
124
+
125
+ ## Install, Upgrade, and Uninstall
126
+
127
+ ### Tool installation
128
+
129
+ ```bash
130
+ uv tool install cli-usereq
131
+ ```
132
+
133
+ PyPI is the canonical distribution channel (project [`cli-usereq`](https://pypi.org/project/cli-usereq/), published via OIDC trusted publishing by the `release-pypi.yml` workflow for `master` tags). GitHub hosts intermediate and test releases; see [Install from GitHub (alternative channel)](#install-from-github-alternative-channel) below.
134
+
135
+ This exposes the CLI as `req` (also callable as `usereq` or `python -m usereq`). After installation, verify with `req --version`.
136
+
137
+ ### Tool upgrade and auto-install
138
+
139
+ ```bash
140
+ req --upgrade
141
+
142
+ # force full package download and complete reinstallation
143
+ req --upgrade --force
144
+ ```
145
+
146
+ On Linux this executes the standard `uv tool install cli-usereq` command from the PyPI index without any forcing option; on other platforms the manual command is printed and `uv` is not executed. Adding `--force` forces full package download and complete reinstallation: `req --upgrade --force` executes `uv tool install cli-usereq --force --reinstall --refresh`. Use `req --upgrade --develop` (or the equivalent `req --upgrade --dev`) to install the latest tagged GitHub release instead of PyPI. When the upgrade succeeds and `auto-install` is enabled (the default), the persisted providers are automatically re-provisioned — equivalent to running `install`. Provide `--prj-base` in the same invocation to enable this; without it, a warning is printed and the provider update is skipped. Disable the behavior persistently with `--disable-auto-install` and re-enable it with `--enable-auto-install`.
147
+
148
+ ### Install from GitHub (alternative channel)
149
+
150
+ Intermediate and test releases are published on GitHub at [`Ogekuri/CLI-useReq`](https://github.com/Ogekuri/CLI-useReq) and can be installed as an alternative to the PyPI channel:
151
+
152
+ ```bash
153
+ # persistent install tracking the git repository
154
+ uv tool install cli-usereq --force --refresh --from git+https://github.com/Ogekuri/CLI-useReq.git
155
+
156
+ # or run instantly without installing
157
+ uvx --from git+https://github.com/Ogekuri/CLI-useReq.git req --help
158
+
159
+ # or upgrade an existing installation to the latest GitHub release
160
+ req --upgrade --develop
161
+ ```
162
+
163
+ On Linux `req --upgrade --develop` (or `req --upgrade --dev`) executes the standard `uv tool install cli-usereq --from git+https://github.com/Ogekuri/CLI-useReq.git@<TAG>` command, where `<TAG>` is the latest tagged release resolved through the GitHub releases API regardless of the branch holding it; on other platforms the manual command is printed and `uv` is not executed. Adding `--force` (`req --upgrade --develop --force`) executes `uv tool install cli-usereq --force --reinstall --refresh --from git+https://github.com/Ogekuri/CLI-useReq.git@<TAG>` instead.
164
+
165
+ ### Tool removal
166
+
167
+ ```bash
168
+ req --uninstall # executes `uv tool uninstall cli-usereq` on Linux and cleans the release-check cache
169
+ ```
170
+
171
+ ### Provider artifacts
172
+
173
+ - `req install` — installs or updates the skills of the providers persisted in the configuration into user-level directories and prints a Unicode installation summary report (`Provider` / `Skills Installed` columns). Requires at least one enabled provider, otherwise an English error is printed and the exit code is 4. Skills are the only supported artifact type: prompts and agents are no longer installed.
174
+ - `req uninstall` — reciprocal of `install`: removes the `req-*` skill artifacts of the configured providers from the user-level skills directories.
175
+ - `req show` — prints the active configuration as tables: settings (including `auto-install`), the `Provider` / `Skills Path` table listing enabled providers in alphabetical order with their hardcoded home-relative skills path, one dedicated per-provider table showing the installation status of the `skills` component detected on disk, and the enabled static-check entries.
176
+
177
+ Skills are always installed into **user-level CLI configuration directories under your HOME** (`~/.claude/skills`, `~/.agents/skills`, `~/.gemini/config/skills`, `~/.openclaw/workspace/skills`, `~/.config/opencode/skills`, `~/.pi/agent/skills`); nothing is ever written into the project repository.
178
+
179
+ ## Configuration
180
+
181
+ All configuration lives in a single user-global file: `~/.config/usereq/config.json`. No configuration files are written to the project home or git repository path.
182
+
183
+ Canonical keys: `docs-dir`, `tests-dir`, `src-dir`, `providers`, `static-check`, `auto-install`.
184
+
185
+ ### Project directories
186
+
187
+ - `--set-docs-dir DOCS_DIR`, `--set-src-dir SRC_DIR` (repeatable), and `--set-tests-dir TESTS_DIR` persist project-relative directory values (each requires `--prj-base`; values must resolve under it). Install-time prompt substitution renders `%%DOC_PATH%%`/`%%SRC_PATHS%%`/`%%TEST_PATH%%` from these values, defaulting to `usereq/docs`, `src`, and `tests` when unset.
188
+ - Defaults when the configuration stores no value: `usereq` (docs), `src` (sources), `tests` (tests).
189
+ - On fresh installation, missing configured directories (including parents) are created automatically under `--prj-base`.
190
+
191
+ Typical project layout:
192
+
193
+ ```text
194
+ .
195
+ ├── docs/ # or usereq/ by default: REQUIREMENTS.md, WORKFLOW.md, REFERENCES.md, FLOWCHART.md
196
+ ├── src/ # source code
197
+ └── tests/ # unit test suite
198
+ ```
199
+
200
+ ### Providers
201
+
202
+ All providers are disabled by default. Provider enablement is exclusive to the repeatable config-only flag, which accepts only the provider CLI name exactly like `--disable PROVIDER`:
203
+
204
+ ```bash
205
+ req --enable PROVIDER
206
+ ```
207
+
208
+ - `PROVIDER`: `antigravity`, `claude`, `codex`, `openclaw`, `opencode`, or `pi`.
209
+ - Example: `req --enable pi`
210
+
211
+ Behavior:
212
+
213
+ - `--enable` only updates `~/.config/usereq/config.json`; it never installs artifacts. Enabling a provider again replaces all its previously persisted entries while preserving every other provider.
214
+ - `--disable PROVIDER` removes all persisted entries of that provider (unknown tokens exit with code 1).
215
+ - Unknown or invalid tokens print an English error identifying the invalid token and exit with code 1.
216
+ - Configuration flags may be combined with the `install` subcommand in one invocation (`req --enable pi install`): configuration is applied first, then installation proceeds.
217
+
218
+ Provider skills paths:
219
+
220
+ | Provider | Skills path |
221
+ | --- | --- |
222
+ | antigravity | `~/.gemini/config/skills` |
223
+ | claude | `~/.claude/skills` |
224
+ | codex | `~/.agents/skills` |
225
+ | openclaw | `~/.openclaw/workspace/skills` |
226
+ | opencode | `~/.config/opencode/skills` |
227
+ | pi | `~/.pi/agent/skills` |
228
+
229
+ ### Static checks
230
+
231
+ ```bash
232
+ req --enable-static-check SPEC # repeatable, config-only, no --prj-base required
233
+ req --disable-static-check SPEC # reciprocal removal
234
+ ```
235
+
236
+ - `SPEC` format: `LANG=MODULE[,CMD[,PARAM...]]`.
237
+ - `MODULE`: `Dummy`, `Pylance`, `Ruff`, or `Command` (case-insensitive); for `Command`, `CMD` is the mandatory binary and the remaining tokens are `params`. Tokens containing commas must be wrapped in double quotes.
238
+ - `LANG`: the 20 canonical language names, case-insensitive (Python, C, C++, C#, Rust, JavaScript, TypeScript, Java, Go, Ruby, PHP, Swift, Kotlin, Scala, Lua, Shell, Perl, Haskell, Zig, Elixir); aliases like `cpp`, `csharp`, `js`, `ts`, `sh` are accepted.
239
+ - Enabling merges into the configuration without replacing existing entries: pre-existing entries are preserved, identity-duplicates (same language, module, cmd, params) are ignored.
240
+ - Disabling: `LANG=MODULE[,CMD[,PARAM...]]` removes the exact matching entry; bare `LANG` removes the whole language key. Explicitly disabling everything persists an empty `"static-check"` object, which keeps the defaults switched off.
241
+
242
+ Default static-check configuration (applied when the configuration stores no `"static-check"` entry; any present entry — including an empty object — suppresses the defaults):
243
+
244
+ | Language | Default checkers |
245
+ | --- | --- |
246
+ | C | `cppcheck --error-exitcode=1 --enable=warning,style,performance,portability --std=c11`, `clang-format --dry-run --Werror` |
247
+ | C++ | `cppcheck ... --std=c++20`, `clang-format --dry-run --Werror` |
248
+ | JavaScript | `node --check` |
249
+ | Python | `Pylance` (pyright), `Ruff` |
250
+ | TypeScript | `eslint` |
251
+
252
+ Pre-flight: before executing any checker, availability is verified — `Dummy` always; `Pylance`/`Ruff` via their module in the active interpreter; `Command` via its binary on PATH. An unavailable checker yields `Result: FAIL` with evidence identifying the missing checker or binary, and execution continues with the remaining checks.
253
+
254
+ 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.
255
+
256
+ ## Command Reference
257
+
258
+ `req` can be run from any directory. Two path arguments drive location resolution:
259
+
260
+ - `--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.
261
+ - `--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.
262
+ - `--prj-base` and `--git-base` are never persisted in `~/.config/usereq/config.json`.
263
+
264
+ ### Analysis subcommands
265
+
266
+ The analysis commands are bare subcommands (no `--` prefix); the project-scan ones require `--prj-base`, and none of them requires `--git-base`. Legacy `--`-prefixed forms are not accepted.
267
+
268
+ | Subcommand | Purpose |
269
+ | --- | --- |
270
+ | `files-tokens FILE [FILE ...]` | Count tokens and chars for the given files |
271
+ | `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 |
274
+ | `files-static-check --prj-base P FILE [FILE ...]` | Run static analysis on the given files |
275
+ | `tokens --prj-base P` | Count tokens/chars for canonical docs (`REQUIREMENTS.md`, `WORKFLOW.md`, `REFERENCES.md`) in configured `docs-dir` |
276
+ | `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 |
279
+ | `static-check --prj-base P` | Static analysis on `src-dir` + `tests-dir` selections (excluding `fixtures/`) |
280
+
281
+ Notes:
282
+
283
+ - Add `--enable-line-numbers` (before the subcommand token) to include `<n>:` prefixes in `files-compress`, `compress`, `files-find`, and `find` output.
284
+ - `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
+ - `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
+
287
+ #### Supported &lt;TAG&gt; in `find` commands
288
+
289
+ - **Python**: CLASS, FUNCTION, DECORATOR, IMPORT, VARIABLE
290
+ - **C**: STRUCT, UNION, ENUM, TYPEDEF, MACRO, FUNCTION, IMPORT, VARIABLE
291
+ - **C++**: CLASS, STRUCT, ENUM, NAMESPACE, FUNCTION, MACRO, IMPORT, TYPE_ALIAS
292
+ - **C#**: CLASS, INTERFACE, STRUCT, ENUM, NAMESPACE, FUNCTION, PROPERTY, IMPORT, DECORATOR, CONSTANT
293
+ - **Rust**: FUNCTION, STRUCT, ENUM, TRAIT, IMPL, MODULE, MACRO, CONSTANT, TYPE_ALIAS, IMPORT, DECORATOR
294
+ - **JavaScript**: CLASS, FUNCTION, COMPONENT, CONSTANT, IMPORT, MODULE
295
+ - **TypeScript**: INTERFACE, TYPE_ALIAS, ENUM, CLASS, FUNCTION, NAMESPACE, MODULE, IMPORT, DECORATOR
296
+ - **Java**: CLASS, INTERFACE, ENUM, FUNCTION, IMPORT, MODULE, DECORATOR, CONSTANT
297
+ - **Go**: FUNCTION, METHOD, STRUCT, INTERFACE, TYPE_ALIAS, CONSTANT, IMPORT, MODULE
298
+ - **Ruby**: CLASS, MODULE, FUNCTION, CONSTANT, IMPORT, DECORATOR
299
+ - **PHP**: CLASS, INTERFACE, TRAIT, FUNCTION, NAMESPACE, IMPORT, CONSTANT
300
+ - **Swift**: CLASS, STRUCT, ENUM, PROTOCOL, EXTENSION, FUNCTION, IMPORT, CONSTANT, VARIABLE
301
+ - **Kotlin**: CLASS, INTERFACE, ENUM, FUNCTION, CONSTANT, VARIABLE, MODULE, IMPORT, DECORATOR
302
+ - **Scala**: CLASS, TRAIT, MODULE, FUNCTION, CONSTANT, VARIABLE, TYPE_ALIAS, IMPORT
303
+ - **Lua**: FUNCTION, VARIABLE
304
+ - **Shell**: FUNCTION, VARIABLE, IMPORT
305
+ - **Perl**: FUNCTION, MODULE, IMPORT, CONSTANT
306
+ - **Haskell**: MODULE, TYPE_ALIAS, STRUCT, CLASS, FUNCTION, IMPORT
307
+ - **Zig**: FUNCTION, STRUCT, ENUM, UNION, CONSTANT, VARIABLE, IMPORT
308
+ - **Elixir**: MODULE, FUNCTION, PROTOCOL, IMPL, STRUCT, IMPORT
309
+
310
+ ### Git and docs commands
311
+
312
+ - `--git-check` — verify clean working tree and valid HEAD in the `--git-base` repository (requires `--git-base`).
313
+ - `--docs-check` — verify existence of `REQUIREMENTS.md`, `WORKFLOW.md`, and `REFERENCES.md` in the configured `docs-dir` (requires `--prj-base`).
314
+ - `--git-wt-name` — print a standardized worktree name `useReq-<PROJECT>-<BRANCH>-<TIMESTAMP>` (requires `--git-base`).
315
+ - `--git-wt-create WT_NAME` — create an isolated git worktree and branch with the given name; copies `.venv` (when present) into the new worktree context (requires `--git-base`).
316
+ - `--git-wt-delete WT_NAME` — force-remove the exact target worktree and branch by name (requires `--git-base`).
317
+
318
+ ### Other flags
319
+
320
+ - `--verbose` / `--debug` — detailed and diagnostic output.
321
+ - `--ver` / `--version` — print the installed package version and query PyPI and GitHub, printing three aligned lines: `Current Installed : <version>`, `Latest @ PyPI : <version>`, and `Latest @ GitHub : <version>` (`unknown` when a repository cannot be reached).
322
+ - `--develop` / `--dev` — with `--upgrade`: install the latest tagged GitHub release from `git+https://github.com/Ogekuri/CLI-useReq.git@<TAG>`, with `<TAG>` resolved through the GitHub releases API regardless of branch, instead of PyPI; `--dev` is an equivalent alias of `--develop`.
323
+ - `--force` — with `--upgrade`: force full package download and complete reinstallation (`uv tool install ... --force --reinstall --refresh`); without `--force` the standard install/update process runs without any forcing option.
324
+ - `-h` / `--help` — print command help and exit.
325
+
326
+ A startup release check queries the latest PyPI release (idle-gated to at most once per hour; once per day on API failures) and prints a bright-green stderr notice when a newer version is available.
327
+
328
+ ## Prompt Catalog
329
+
330
+ | Prompt | Description |
331
+ | --- | --- |
332
+ | `write` | Produce a *SRS* draft based on the User Request description |
333
+ | `create` | Write a *Software Requirements Specification* using the project's source code |
334
+ | `recreate` | Reorganize and update the *SRS* based on source code analysis (preserve requirement IDs) |
335
+ | `renumber` | Deterministically renumber requirement IDs in the *SRS* without changing requirement text or order |
336
+ | `analyze` | Produce an analysis report |
337
+ | `change` | Update the requirements and implement the corresponding changes |
338
+ | `check` | Run the requirements check |
339
+ | `cover` | Implement minimal changes to cover uncovered existing requirements |
340
+ | `fix` | Fix a defect without changing the requirements |
341
+ | `implement` | Implement source code from requirements (from scratch) |
342
+ | `new` | Implement a new requirement and the corresponding source code changes |
343
+ | `refactor` | Perform a refactor without changing the requirements |
344
+ | `readme` | Write `README.md` from user-visible implementation evidence |
345
+ | `references` | Write a `REFERENCES.md` using the project's source code |
346
+ | `workflow` | Write a `WORKFLOW.md` using the project's source code |
347
+ | `flowchart` | Write a `FLOWCHART.md` using the project's source code |
348
+
349
+ # Documentation
350
+
351
+ ## Supported CLIs and Extensions
352
+
353
+ ### High-Level Assessment
354
+
355
+ - 🌟 **pi.dev CLI** 🌟 - Supports user-level Agent Skills from `~/.pi/agent/skills/`.
356
+ - 🌟 **Antigravity CLI** 🌟 - Evolution of Gemini CLI; supports user-level skills from `~/.gemini/config/skills/`.
357
+ - 👍 **OpenClaw** 👍 - Supports user-level skills from `~/.openclaw/workspace/skills/`.
358
+ - 👍 **OpenCode** 👍 - Many models available; supports user-level skills from `~/.config/opencode/skills/`.
359
+ - ⚖️ **Claude Code** ⚖️ - Only supports Claude/Anthropic models; supports user-level skills from `~/.claude/skills/`.
360
+ - 🆘 **OpenAI Codex** 🆘 - Only supports OpenAI models; supports user-level skills from `~/.agents/skills/`.
361
+
362
+ ### useReq/req Support
363
+
364
+ - ✅ pi.dev CLI
365
+ - ✅ Antigravity CLI
366
+ - ✅ Claude Code
367
+ - ✅ OpenAI Codex
368
+ - ✅ OpenClaw
369
+ - ✅ OpenCode
370
+
371
+ | ✅ supported | ❌ not supported |
372
+
373
+ GitHub Copilot and Kiro CLI are not supported: their skill configuration is repository-scoped only and cannot be managed at user level. Prompts and agents are no longer supported artifacts: useReq installs skills only.
374
+
375
+ ### Skills Details
376
+
377
+ Every enabled provider receives `req-<name>/SKILL.md` skill directories under its hardcoded skills root:
378
+
379
+ - ✅ pi.dev CLI: [`/skill:req-create`] — `~/.pi/agent/skills/req-create/SKILL.md`; pi discovers user skills from `~/.pi/agent/skills/` and registers them as `/skill:name` commands; arguments after the command are appended to the skill content as `User: <args>`.
380
+ - ✅ Antigravity CLI: [`$req-create`] — `~/.gemini/config/skills/req-create/SKILL.md`.
381
+ - ✅ OpenAI Codex: [`$req-create`] — `~/.agents/skills/req-create/SKILL.md`.
382
+ - ✅ Claude Code: [`/req-create`] — `~/.claude/skills/req-create/SKILL.md`.
383
+ - ✅ OpenClaw: [`$req-create`] — `~/.openclaw/workspace/skills/req-create/SKILL.md`.
384
+ - ✅ OpenCode: [`/req-create`] — `~/.config/opencode/skills/req-create/SKILL.md`.
385
+
386
+ ## Default Workflow
387
+
388
+ Click to zoom flowchart image.
389
+
390
+ [![Flowchart](https://raw.githubusercontent.com/Ogekuri/useReq/refs/heads/master/images/flowchart-bw.svg)](https://raw.githubusercontent.com/Ogekuri/useReq/refs/heads/master/images/flowchart-bw.svg)
391
+
392
+ ## Guidelines
393
+
394
+ `GUIDELINES_DIR` is fixed to the packaged `resources/guidelines` directory of the running installation and is not configurable. Generated prompts and skills reference the packaged resources of the active installation through home-relative paths, including `%%TEMPLATE_PATH%%` for templates; guideline files themselves are never copied, created, or modified in project or user directories. Re-run `req install` after an upgrade so rendered paths follow the active installation.
395
+
396
+ ## Repository Documentation
397
+
398
+ Requirements-driven projects keep their normative documentation under the configured `docs-dir`:
399
+
400
+ - `REQUIREMENTS.md` — the Software Requirements Specification (SRS).
401
+ - `WORKFLOW.md` — runtime model: execution units, call-trace trees, communication edges.
402
+ - `REFERENCES.md` — structured symbol index of the source code.
403
+ - `FLOWCHART.md` — workflow flowchart.
404
+
405
+ ## Development Notes
406
+
407
+ - `scripts/req.sh` runs the CLI via `uv run python -m usereq.cli` from the repository root, forwarding all user arguments unchanged.
408
+ - `scripts/test-install.sh` performs an isolated-HOME smoke installation (`--enable pi` + `install`).
409
+ - `scripts/prompts-update.sh` synchronizes the bundled prompts from the upstream [Ogekuri/CLI-Prompts](https://github.com/Ogekuri/CLI-Prompts) releases into `src/usereq/resources/prompts`.
410
+ - `uv.lock` is the canonical dependency lockfile for execution, build, development, testing, and static analysis.
411
+
412
+ ## Note on Git usage
413
+
414
+ This section describes the Git behavior when executing the commands provided by the scripts.
415
+
416
+ - Required state before execution:
417
+ - Execute commands from a working branch (not in detached HEAD).
418
+ - Preferably, the working tree should be clean: avoid unintended changes in the repository before starting the scripts.
419
+ - Save all files and verify that you are in the correct project directory.
420
+ - **IMPORTANT:** `useReq/req` stores its configuration in the user-global file `~/.config/usereq/config.json`; no configuration is written to the project repository, so git worktree checkouts need no configuration tracking.
421
+
422
+ - What the scripts do to the repository:
423
+ - The scripts may modify, create, or remove files in the working tree (files on disk).
424
+ - They do not modify Git history (HEAD), branches, or tags automatically.
425
+ - The index (staging area) and history remain unchanged until the user manually performs staging/commit operations.
426
+
427
+ - How to commit (recommended practice):
428
+ - Review changes generated by the scripts before including them in a commit.
429
+ - Manually add files to commit using `git add <file...>`.
430
+ - Execute the commit with a structured message, for example:
431
+ `git commit -m "change(<COMPONENT>): <SHORT-DESCRIPTION> [<DATE>]"`.
432
+ - Staging and commit operations are under the user's control; the scripts do not perform automatic commits or update Git references.
433
+
434
+ - Practical warnings:
435
+ - Do not use destructive commands (e.g., `git reset --hard`, `git clean -fd`) to "clean" the repository without verifying the impact.
436
+ - If you prefer to isolate changes, execute commands in a branch or a copy of the repository.
437
+
438
+ ## Known Issues
439
+
440
+ - **Grok Code Fast 1** does not respect the TODO list and does not wait for user approval.
441
+ * Defect #3180 → [Bug: Grok Code Fast 1 not update to do list correctly #3180](https://github.com/Kilo-Org/kilocode/issues/3180)
442
+
443
+ # License
444
+
445
+ Copyright (C) Ogekuri.
446
+
447
+ This program is free software: you can redistribute it and/or modify it under the terms of the **GNU General Public License as published by the Free Software Foundation, version 3** (GPL-3.0), of which a full copy is provided in the [`LICENSE`](LICENSE) file of this repository.
448
+
449
+ This program is distributed in the hope that it will be useful, but **without any warranty**; without even the implied warranty of merchantability or fitness for a particular purpose. See the LICENSE file for details.
450
+
451
+ # Acknowledgments
452
+
453
+ - **[Ogekuri/CLI-Prompts](https://github.com/Ogekuri/CLI-Prompts)** — upstream source of the bundled requirements-engineering prompt catalog (`src/usereq/resources/prompts`).
454
+ - **[Astral](https://astral.sh)** — for `uv`, the Python package and project manager that powers installation, execution, and self-upgrade.
455
+ - **[OpenAI tiktoken](https://github.com/openai/tiktoken)** — token counting for LLM context budgeting.
456
+ - **[pyright](https://github.com/microsoft/pyright)** and **[ruff](https://github.com/astral-sh/ruff)** — the static-analysis engines exposed through the `Pylance` and `Ruff` modules.
457
+ - **[tree-sitter](https://tree-sitter.github.io/tree-sitter/)** — inspiration for the multi-language source-analysis approach.
@@ -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.3)
13
+ # useReq / req (0.75.7)
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+">
@@ -1,18 +1,18 @@
1
1
  [build-system]
2
- requires = ["setuptools", "wheel", "build"]
2
+ requires = ["setuptools>=77.0.0", "wheel", "build"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cli-usereq"
7
- version = "0.75.3"
7
+ version = "0.75.7"
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"
11
- license = { file = "LICENSE" }
11
+ license = "GPL-3.0-only"
12
+ license-files = ["LICENSE"]
12
13
  dependencies = [
13
14
  "tiktoken",
14
15
  "pyyaml",
15
- "pytest",
16
16
  "ruff",
17
17
  "pyright",
18
18
  ]
@@ -38,8 +38,17 @@ req = "usereq.cli:main"
38
38
  usereq = "usereq.cli:main"
39
39
  cli-usereq = "usereq.cli:main"
40
40
 
41
+ [dependency-groups]
42
+ dev = ["pytest"]
43
+
41
44
  [tool.setuptools]
42
- packages = ["usereq"]
45
+ packages = [
46
+ "usereq",
47
+ "usereq.resources",
48
+ "usereq.resources.guidelines",
49
+ "usereq.resources.prompts",
50
+ "usereq.resources.templates",
51
+ ]
43
52
  package-dir = {"" = "src"}
44
53
  include-package-data = true
45
54
 
@@ -0,0 +1,36 @@
1
+ """@file setup.py
2
+ @brief Setuptools entry shim that excludes generated egg-info metadata from the sdist.
3
+ @details Project metadata and build configuration remain declared in pyproject.toml (PEP 621,
4
+ PEP 517, PEP 639). This module only overrides the sdist command: setuptools appends
5
+ `<egg_info>/SOURCES.txt` to the sdist file list unconditionally, so the override removes every
6
+ project-relative path containing a `*.egg-info` path component before the release tree is
7
+ populated. Complexity: O(F * P) over F file paths with P path components each.
8
+ """
9
+
10
+ from setuptools import setup
11
+ from setuptools.command.sdist import sdist as _sdist
12
+
13
+
14
+ class SdistWithoutEggInfo(_sdist):
15
+ """@brief Sdist command variant omitting generated egg-info paths from the release tree.
16
+ @details Keeps every setuptools sdist behavior; only the candidate file list passed to
17
+ `make_release_tree` is filtered. Side effects: none beyond the delegated sdist tree build.
18
+ """
19
+
20
+ def make_release_tree(self, base_dir, files) -> None:
21
+ """@brief Populate the sdist release tree while excluding egg-info paths.
22
+ @details Rejects every candidate whose path contains a component ending in `.egg-info`,
23
+ then delegates population to setuptools with the retained list.
24
+ @param base_dir {str} Absolute release-tree root directory created by the sdist command.
25
+ @param files {list[str]} Project-relative candidate file paths.
26
+ @return {None} Function return value.
27
+ """
28
+ retained = [
29
+ entry
30
+ for entry in files
31
+ if not any(part.endswith(".egg-info") for part in entry.split("/"))
32
+ ]
33
+ super().make_release_tree(base_dir, retained)
34
+
35
+
36
+ setup(cmdclass={"sdist": SdistWithoutEggInfo})
@@ -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.3"
21
+ __version__ = "0.75.7"
22
22
  """! @brief Semantic version string of the package."""
23
23
 
24
24