You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [Unreleased]
9
9
10
-
## [0.2.2] - 2026-04-02
10
+
### Fixed
11
+
-**Governance RTD table rendering** (#55): rows 2–6 of the Modular Governance table in `docs/site/governance.md` started with `||` instead of `|`, breaking layout. Introduced during the uppercase filename migration.
12
+
13
+
### Added
14
+
-**RTD commands page complete** (#56): `docs/site/commands.md` now documents all 40+ commands — previously 13 of 40+ were documented. Added sections for `exec`/`ps`/`abort`, `commit`/`push`/`sync`/`branch`/`pr`, `session-end`, `update`, `apply`, `migrate-project`, `release`, `verify-release`, `ledger add/list/stats`, `req list/add/trace/gaps/orphans`, `plugin`, `serve`, and `credits limits`.
15
+
-**H11/H12 governance rules and blocking-loop enforcement** (#58): two new hard rules added to the `RULES.md` governance template. H11 requires every loop or blocking wait in agent-written scripts to have a deadline, fallback exit, and diagnostic message. H12 requires Windows multi-step automation to use `.cmd` files. `specsmith validate` now scans `.sh`/`.cmd`/`.ps1`/`.bash` files under `scripts/` and the project root and flags infinite-loop patterns without a recognised deadline/timeout guard.
16
+
-**Proactive per-model rate-limit pacing** (#59): `BUILTIN_PROFILES` constant ships conservative RPM/TPM defaults for OpenAI (gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo, o1, o1-mini, o3-mini, gpt-5.4, wildcard), Anthropic (claude-opus-4, claude-sonnet-4, claude-haiku-3-5, claude-3-5-sonnet, wildcard), and Google (gemini-1.5-pro, gemini-1.5-flash, gemini-2.0-flash, gemini-2.5-pro, wildcard). Two new `credits limits` subcommands: `status` (rolling-window RPM/TPM/concurrency snapshot) and `defaults` (list or `--install` built-in profiles). Local overrides always take precedence over built-ins.
17
+
-**Rate Limit Pacing RTD page**: new `docs/site/rate-limits.md` documents the scheduler model, built-in profiles table, CLI commands, persistent state, and the Python API.
18
+
-**README updated**: new sections for Governance Rules (H11/H12) and Proactive Rate Limit Pacing with RTD links. Commands table expanded to all major command groups.
19
+
20
+
## [0.2.2]
11
21
12
22
### Fixed
13
23
-**Upgrade auto-fixes AGENTS.md references**: when `upgrade` renames governance files (lowercase→uppercase), it now rewrites path references in AGENTS.md, CLAUDE.md, GEMINI.md, SKILL.md, and all agent config files automatically.
GitHub Actions, GitLab CI, Bitbucket Pipelines — all with tool-aware CI generated from the verification tool registry. Dependabot/Renovate configured per language ecosystem.
106
112
113
+
## Governance Rules (H1–H12)
114
+
115
+
specsmith-governed projects enforce 12 hard rules. Two were added in v0.2.3 for agentic workflows:
116
+
117
+
-**H11** — Every loop or blocking wait in agent-written scripts must have a deadline, a fallback exit, and a diagnostic message on timeout. `specsmith validate` enforces this automatically.
118
+
-**H12** — On Windows, multi-step automation goes into a `.cmd` file, not inline shell invocations or `.ps1` files.
119
+
120
+
See [Governance Model](https://specsmith.readthedocs.io/en/stable/governance/) for the full rule set.
121
+
122
+
## Proactive Rate Limit Pacing
123
+
124
+
specsmith ships a rolling-window scheduler that paces AI provider requests before dispatch:
125
+
126
+
- Built-in RPM/TPM profiles for OpenAI, Anthropic, and Google models (including wildcard fallbacks)
127
+
- Pre-dispatch budget check: sleeps until the 60-second window refills instead of overshooting
128
+
- Parses OpenAI-style `"Please try again in 10.793s"` messages and obeys them
129
+
- Adaptive concurrency: halved after a 429, gradually restored after consecutive successes
130
+
- Local overrides always take precedence over built-in defaults
131
+
132
+
```bash
133
+
specsmith credits limits defaults # list built-in profiles
134
+
specsmith credits limits defaults --install # merge into project config
135
+
specsmith credits limits status --provider openai --model gpt-5.4
136
+
```
137
+
138
+
See [Rate Limit Pacing](https://specsmith.readthedocs.io/en/stable/rate-limits/) for full details.
139
+
107
140
## Documentation
108
141
109
-
**[specsmith.readthedocs.io](https://specsmith.readthedocs.io)** — Full user manual with tutorials, command reference, project type details, tool registry, governance model, troubleshooting.
142
+
**[specsmith.readthedocs.io](https://specsmith.readthedocs.io)** — Full user manual with tutorials, command reference, project type details, tool registry, governance model, rate-limit pacing, troubleshooting.
-`--timeout INT` — Maximum seconds to wait (default: 120). Process is killed when deadline fires.
223
+
-`--project-dir PATH` — Project root (default: `.`). PID and log files go under `.specsmith/`.
224
+
225
+
Tracks the process in `.specsmith/pids/<pid>.json` and logs stdout/stderr to `.specsmith/logs/`. Works on Windows (taskkill), Linux, and macOS (SIGTERM → SIGKILL).
226
+
227
+
**Exit codes:** Mirrors the child process exit code. Returns 124 on timeout.
228
+
229
+
## `specsmith ps`
230
+
231
+
List tracked running processes.
232
+
233
+
```bash
234
+
specsmith ps --project-dir ./my-project
235
+
```
236
+
237
+
Shows PID, time remaining to timeout, and command for every tracked process. Prunes stale PID files for processes that already exited.
238
+
239
+
## `specsmith abort`
240
+
241
+
Kill tracked process(es).
242
+
243
+
```bash
244
+
specsmith abort --pid 12345
245
+
specsmith abort --all
246
+
```
247
+
248
+
**Options:**
249
+
250
+
-`--pid INT` — Kill a specific tracked PID.
251
+
-`--all` — Kill every tracked process.
252
+
253
+
Without `--pid` or `--all`, prints the current process list and instructions.
254
+
255
+
## `specsmith commit`
256
+
257
+
Governance-aware commit: checks ledger, optionally audits, then commits.
258
+
259
+
```bash
260
+
specsmith commit -m "feat: add export command"
261
+
specsmith commit --no-audit --auto-push
262
+
```
263
+
264
+
**Options:**
265
+
266
+
-`-m / --message TEXT` — Override the commit message (default: last ledger entry heading).
267
+
-`--no-audit` — Skip the pre-commit audit check.
268
+
-`--auto-push` — Push after a successful commit.
269
+
270
+
Warns if `LEDGER.md` was not updated since the last commit.
271
+
272
+
## `specsmith push`
273
+
274
+
Push the current branch with safety checks.
275
+
276
+
```bash
277
+
specsmith push
278
+
specsmith push --force
279
+
```
280
+
281
+
**Options:**
282
+
283
+
-`--force` — Skip branch-protection checks.
284
+
285
+
## `specsmith sync`
286
+
287
+
Pull latest and warn about governance conflicts.
288
+
289
+
```bash
290
+
specsmith sync --project-dir ./my-project
291
+
```
292
+
293
+
Runs `git pull` and checks for conflicts in governance files (AGENTS.md, LEDGER.md, docs/governance/*).
294
+
295
+
## `specsmith branch`
296
+
297
+
Strategy-aware branch management.
298
+
299
+
```bash
300
+
specsmith branch create feature/my-feature
301
+
specsmith branch list
302
+
```
303
+
304
+
**Subcommands:**
305
+
306
+
-`create NAME` — Create a branch following the configured branching strategy (gitflow / trunk-based / GitHub Flow). Reads strategy from `scaffold.yml`.
307
+
-`list` — List branches with their role annotation (main, develop, feature, hotfix, etc.).
308
+
309
+
## `specsmith pr`
310
+
311
+
Create a PR with governance context in the body.
312
+
313
+
```bash
314
+
specsmith pr --title "Add export command"
315
+
specsmith pr --draft
316
+
```
317
+
318
+
**Options:**
319
+
320
+
-`--title TEXT` — PR title.
321
+
-`--draft` — Create as a draft PR.
322
+
323
+
Appends the first 2000 characters of `specsmith export` output to the PR body. Requires `gh` (GitHub), `glab` (GitLab), or `bb` (Bitbucket) CLI.
324
+
325
+
## `specsmith session-end`
326
+
327
+
Run the end-of-session checklist.
328
+
329
+
```bash
330
+
specsmith session-end --project-dir ./my-project
331
+
```
332
+
333
+
Checks: uncommitted changes, ledger updated, open TODOs count, audit health. Reports items that need action before ending the session.
334
+
335
+
## `specsmith update`
336
+
337
+
Check for updates and optionally install the latest version + migrate the project.
Updates version in `pyproject.toml`, `Cargo.toml`, `package.json`, `src/**/__init__.py`, README badges, and CHANGELOG. Scans for references to the old version that may need updating. Prints the next manual steps (CHANGELOG, git tag, push).
385
+
386
+
## `specsmith verify-release`
387
+
388
+
Post-release smoke check: verify PyPI, RTD, and GitHub release are live.
389
+
390
+
```bash
391
+
specsmith verify-release
392
+
```
393
+
394
+
Checks that the installed version is published on PyPI, that the RTD site is reachable, and that the GitHub Release tag exists. Requires `gh` CLI for the GitHub check.
-`list` — List all requirements with status, priority, and description.
427
+
-`add REQ_ID` — Add a new requirement stub to `docs/REQUIREMENTS.md`.
428
+
-`trace` — Show REQ → TEST traceability matrix (which tests cover each requirement).
429
+
-`gaps` — List requirements that have no test coverage.
430
+
-`orphans` — List tests that reference non-existent requirement IDs.
431
+
432
+
## `specsmith plugin`
433
+
434
+
List installed specsmith plugins.
435
+
436
+
```bash
437
+
specsmith plugin
438
+
```
439
+
440
+
Plugins extend project types and tool registries. They register via `pyproject.toml` entry points under `specsmith.types`. Shows each plugin's load status and any import errors.
441
+
442
+
## `specsmith serve`
443
+
444
+
Start the local API server for the web dashboard (placeholder).
445
+
446
+
```bash
447
+
specsmith serve --port 8910
448
+
```
449
+
450
+
Not yet fully implemented. See project roadmap for the planned REST API.
-`set` — Create or replace a local profile. Options: `--provider`, `--model`, `--rpm`, `--tpm`, `--target FLOAT` (default 0.70), `--concurrency INT` (default 1).
468
+
-`status` — Show the rolling-window snapshot for a model: requests and tokens used in the current 60-second window, concurrency, moving averages.
469
+
-`defaults` — List built-in profiles for common OpenAI, Anthropic, and Google models. Use `--install` to merge them into the local project config (existing overrides are preserved).
470
+
471
+
Profiles are stored at `.specsmith/model-rate-limits.json` (gitignored). The scheduler uses these to pace requests before dispatch and to apply exponential backoff after a 429.
|`DRIFT-METRICS.md`| Drift detection, feedback loops, health signals | On audit or session start |
55
55
56
56
This lazy-loading approach minimizes token consumption — agents only load VERIFICATION.md when they're actually running tests, not at every session start.
57
57
@@ -101,3 +101,19 @@ This is how context persists across sessions. When an agent starts with `resume`
101
101
6.**Consistency** — Do AGENTS.md references resolve? Are requirement IDs unique?
102
102
103
103
`specsmith audit --fix` auto-repairs what it can: creates missing stubs, compresses oversized ledgers, regenerates CI configs.
104
+
105
+
## Hard Rules (H11 and H12)
106
+
107
+
Two rules were added in v0.2.3 specifically for long-running agentic workflows:
108
+
109
+
**H11 — No unbounded loops or blocking I/O without a deadline**
110
+
111
+
Every loop or blocking wait in agent-written scripts and automation must have an explicit deadline or iteration cap, a fallback exit path when the deadline fires, and a diagnostic message on timeout. Violating patterns include `while True:` / `while ($true)` / `for (;;)` with no deadline guard, I/O polling loops with no deadline, and `sleep` inside a loop with no termination condition.
112
+
113
+
`specsmith validate` enforces this by scanning `.sh`, `.cmd`, `.ps1`, and `.bash` files under `scripts/` and the project root for infinite-loop patterns without a recognised deadline/timeout guard.
114
+
115
+
**H12 — Windows multi-step automation via .cmd files**
116
+
117
+
On Windows, multi-step or heavily-quoted automation sequences must be written to a temporary `.cmd` file and executed from there. Inline multi-line quoting on Windows is fragile and causes avoidable hangs. Do not use `.ps1` files for this class of automation unless there is a concrete PowerShell-only requirement.
118
+
119
+
See `docs/governance/RULES.md` in any governed project for the full set of H1–H12 rules and stop conditions.
0 commit comments