@luizsantiago/spec-guardrails 4.5.0 → 4.5.1

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/README.md CHANGED
@@ -144,7 +144,7 @@ Automatic checks at step boundaries — each one blocks a specific kind of short
144
144
  | `quality-checks` | Configured project commands (`npm test`, …) fail during `/verify` |
145
145
  | `lessons` | A failed verify tries to skip the lesson step |
146
146
 
147
- → [Gates](docs/guide/gates.md) · [Garantees matrix](docs/guide/Guarantees-matrix.md)
147
+ → [Gates](docs/guide/gates.md) · [Guarantees matrix](docs/guide/Guarantees-matrix.md)
148
148
 
149
149
  ### Requirements analysis
150
150
 
@@ -235,6 +235,7 @@ Spec Guardrails adapts patterns from open-source work. These are the projects wh
235
235
  | [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills) | MIT | Design-discussion patterns and definition-of-done framing |
236
236
  | [graph-engineering](https://github.com/codejunkie99/graph-engineering) | MIT | Task-graph rules behind safe parallel waves |
237
237
  | [loop-engineering](https://github.com/cobusgreyling/loop-engineering) | MIT | Wave-based execution model |
238
+ | [loopgate_harness](https://github.com/rxdt/loopgate_harness) | MIT | Suppression-bypass blocking, project-configured quality commands as verify evidence, honest-limits and theme-aware diagram presentation |
238
239
 
239
240
  Everything else — the CLI, the Python checks, the platform adapters, and the requirements-analysis phase — is original work in this repository. Full lineage, including references we cite but do not bundle: [Credits and lineage](docs/guide/credits.md).
240
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luizsantiago/spec-guardrails",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "Governed spec-driven development for AI coding agents. Your agent writes the spec, gets your approval, builds in small waves, and proves the result — plans and project memory stored as files in your repo.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,11 +59,14 @@ def read_staged_diff(cwd: Path) -> str:
59
59
  cwd=cwd,
60
60
  capture_output=True,
61
61
  text=True,
62
+ # Paths can carry bytes the platform locale cannot decode.
63
+ encoding="utf-8",
64
+ errors="replace",
62
65
  check=False,
63
66
  )
64
67
  if result.returncode not in (0, 1):
65
- raise RuntimeError(result.stderr.strip() or "git diff --cached --numstat failed")
66
- return result.stdout
68
+ raise RuntimeError((result.stderr or "").strip() or "git diff --cached --numstat failed")
69
+ return result.stdout or ""
67
70
 
68
71
 
69
72
  def count_staged_lines(numstat_text: str) -> int:
@@ -33,11 +33,14 @@ def read_staged_diff(cwd: Path) -> str:
33
33
  cwd=cwd,
34
34
  capture_output=True,
35
35
  text=True,
36
+ # Diffs can carry bytes the platform locale cannot decode (SVG, em dashes).
37
+ encoding="utf-8",
38
+ errors="replace",
36
39
  check=False,
37
40
  )
38
41
  if result.returncode not in (0, 1):
39
- raise RuntimeError(result.stderr.strip() or "git diff --cached failed")
40
- return result.stdout
42
+ raise RuntimeError((result.stderr or "").strip() or "git diff --cached failed")
43
+ return result.stdout or ""
41
44
 
42
45
 
43
46
  def added_lines(diff_text: str) -> list[tuple[str, str]]:
@@ -38,6 +38,9 @@ def run_command(command: str, cwd: Path) -> dict:
38
38
  shell=True,
39
39
  capture_output=True,
40
40
  text=True,
41
+ # Test runners emit symbols the platform locale cannot always decode.
42
+ encoding="utf-8",
43
+ errors="replace",
41
44
  check=False,
42
45
  )
43
46
  output = (completed.stdout or "") + (completed.stderr or "")
@@ -60,6 +60,8 @@ Structural gates run **before** owner review, so they cannot drift when the mode
60
60
  | Rebuild / embed memory index | `npx @luizsantiago/spec-guardrails memory-index rebuild` · `memory-index embed` |
61
61
  | On gate retry (Execute playbook) | `npx @luizsantiago/spec-guardrails execution-policy record-retry Tn` |
62
62
  | On each commit | `python3 .specs/guardrails/scripts/check_commit.py --message "<message>"` |
63
+ | Before each commit (staged diff) | `python3 .specs/guardrails/scripts/check_suppressions.py` |
64
+ | During Verify, when `quality.checks` is configured | `python3 .specs/guardrails/scripts/run_quality_checks.py` |
63
65
  | Before declaring a feature done | `python3 .specs/guardrails/scripts/validate_state.py [feature]` |
64
66
  | Traceability (Medium+ features) | `python3 .specs/guardrails/scripts/validate_traceability.py [feature]` |
65
67
  | Quick mode evidence | `python3 .specs/guardrails/scripts/validate_quick.py [feature]` |
@@ -82,15 +84,15 @@ EXPLORE (optional) → ELICIT (optional) → SPECIFY → DISCUSS (conditional)
82
84
  | Phase | Required | Reference | Sister skill | Gate |
83
85
  | --- | --- | --- | --- | --- |
84
86
  | **Explore** | Optional | `references/explore.md` | — | — |
85
- | **Elicit** | Optional | `references/elicitation.md` | `validate-req-analysis` | (before `/specify`; suggest-only entry) |
87
+ | **Elicit** | Optional | `references/elicitation.md` | | `validate_req_analysis.py` (before `/specify`; suggest-only entry) |
86
88
  | **Constitution** | Once per project | `references/constitution.md` | — | — |
87
89
  | **Specify** | Yes | `references/specify.md` | — | `validate_spec.py` |
88
90
  | **Discuss** | Conditional | `references/discuss.md` | — | — |
89
91
  | **Design** | No | `references/design.md` | — | — |
90
92
  | **Tasks** | No | `references/tasks.md` | `task-graph-engineering.md` | `validate_tasks.py` |
91
93
  | **Analyze** | Before task approval | `references/analyze.md` | — | `analyze_artifacts.py` |
92
- | **Execute** | Yes | `references/implement.md` | `engineering-standards.md` | `check_commit.py` |
93
- | **Verify** | Yes | `references/validate.md` | `security-review.md` | `validate_state.py` |
94
+ | **Execute** | Yes | `references/implement.md` | `engineering-standards.md` | `check_commit.py`, `check_suppressions.py` |
95
+ | **Verify** | Yes | `references/validate.md` | `security-review.md` | `validate_state.py`, `run_quality_checks.py` |
94
96
  | **Archive** | After Verify PASS | `references/archive.md` | `git-handoff.md` | `archive-feature` |
95
97
  | **Converge** | On drift | `references/converge.md` | — | `analyze_artifacts.py` |
96
98
  | **Handoff** | Yes | `references/memory.md` | `git-handoff.md` | — |