@esneiderbravo/speclaw 0.1.13 → 0.1.14

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.
@@ -43,6 +43,22 @@ const MIGRATIONS = [
43
43
  "'test kind does not yet apply' escape hatch. If the section is missing, add it.\n" +
44
44
  "- Preserve all project-specific wording; only apply these speclaw-authored changes.",
45
45
  },
46
+ {
47
+ version: "0.1.14",
48
+ describe: "Real-data-write stop condition in the constitution (personalized files)",
49
+ agentPrompt: "- Add a stop condition, at the same tier as deletes/force-push, that verification " +
50
+ "must NOT create/update/delete the user's real data (a production or development " +
51
+ "database, or files holding real data) — including setting up or tearing down test " +
52
+ "data or running raw store commands (e.g. direct SQL) against a live store. " +
53
+ "Verification runs against an isolated/throwaway store (a temporary copy, an in-memory " +
54
+ "database, a dedicated test store, or a rolled-back transaction); snapshot-and-restore " +
55
+ "is not sanctioned. If a real-store write is genuinely unavoidable, stop and get " +
56
+ "explicit authorization first — a backup is not a substitute.\n" +
57
+ "- Apply it in CLAUDE.md and AGENTS.md (the Rule 6 / stop-conditions list), in " +
58
+ "docs/standards/base-standards.md (the 'ask before irreversible actions' bullet), and " +
59
+ "in docs/standards/testing-standards.md (the 'Manual & end-to-end verification' section).\n" +
60
+ "- Preserve all project-specific wording; only apply these speclaw-authored changes.",
61
+ },
46
62
  ];
47
63
  /**
48
64
  * Update speclaw and bring the current project up to date without a full re-init:
@@ -35,7 +35,10 @@ Claude-specific notes: [`CLAUDE.md`](CLAUDE.md). The law: [`LAWS.md`](LAWS.md).
35
35
  [`docs/standards/conventions.md`](docs/standards/conventions.md).
36
36
  6. **Use the skills.** `ai-specs/` is the canonical home for skills, commands,
37
37
  and subagents, mirrored to each IDE directory via symlinks.
38
- 7. **Ask before irreversible or outward-facing actions.**
38
+ 7. **Ask before irreversible or outward-facing actions** — destructive commands;
39
+ writing to a real data store (DB rows or files with real user data, including
40
+ for tests — verify against an isolated/throwaway store); publishing
41
+ reviews/tickets/comments.
39
42
 
40
43
  ## The standards (the law, in detail)
41
44
 
@@ -81,5 +81,7 @@ task, use it — do not improvise a parallel process.
81
81
  ## Rule 6 — Stop conditions
82
82
 
83
83
  Stop and ask the user before: destructive operations (deletes, force-push,
84
- schema drops), publishing anything outward-facing (PR reviews, tickets,
85
- comments), or any action that contradicts a standard.
84
+ schema drops), writing to a real data store (DB rows or files holding real user
85
+ data — including to set up or tear down test data; verification runs against an
86
+ isolated/throwaway store instead), publishing anything outward-facing (PR
87
+ reviews, tickets, comments), or any action that contradicts a standard.
@@ -45,8 +45,9 @@ bodies. Match what the repo does; do not impose a language it doesn't use.
45
45
  - Code reads like its neighbors (naming, structure, idioms).
46
46
  - Report outcomes faithfully: if a gate fails, say so with the output; never
47
47
  claim a success you did not observe.
48
- - Ask before irreversible or outward-facing actions (destructive commands,
49
- publishing reviews/tickets/comments).
48
+ - Ask before irreversible or outward-facing actions (destructive commands;
49
+ writing to a real data store — DB rows or files holding real user data,
50
+ including to set up or tear down test data; publishing reviews/tickets/comments).
50
51
 
51
52
  <!-- speclaw init: add any project-specific base rules the analysis surfaced. -->
52
53
  {{base_standards_extra}}
@@ -29,6 +29,15 @@ suppressing a linter or deleting a test.
29
29
 
30
30
  - When a change affects runtime behavior and it's feasible, verify it works by
31
31
  exercising the endpoint/UI — don't assume green CI covers everything.
32
+ - **Verification never touches real data.** Run it against an isolated store — a
33
+ temporary copy, an in-memory database, a dedicated test store, or a rolled-back
34
+ transaction — or against pure logic with fixtures. Never create/update/delete
35
+ the user's real data (a production or development database, or files holding
36
+ real data), and never run raw store commands (e.g. direct SQL) against a live
37
+ store, to prove a change. Snapshot-and-restore is not sanctioned. If a
38
+ real-store write is genuinely unavoidable, stop and get explicit authorization
39
+ first — a backup is not a substitute (see the stop conditions in the
40
+ constitution).
32
41
  - The mandatory spec task steps
33
42
  ([`lawbook.md`](lawbook.md)) define which manual checks
34
43
  the agent must execute itself.
@@ -43,6 +43,22 @@ Run them yourself and report real output. A red gate blocks completion.
43
43
  Exercise the behavior (endpoint/UI/CLI) yourself where feasible — do not
44
44
  delegate manual testing to the user. Record what you verified.
45
45
 
46
+ **Verification is isolated by construction — it never touches real data.** Run it
47
+ against an ephemeral or throwaway store: a temporary copy, an in-memory database
48
+ (`:memory:`), a dedicated test store, or inside a transaction that is rolled
49
+ back — best of all, verify pure/domain logic with fixtures and no store at all.
50
+ Do **not** create, update, or delete the user's real data (a production or
51
+ development database, or files holding real data) as a side effect of proving a
52
+ change, and do **not** run raw store commands (e.g. direct SQL) against a live
53
+ store. Snapshot-and-restore is not a sanctioned method — a stray write slips past
54
+ the restore.
55
+
56
+ If isolation is genuinely impossible and a real-store write is unavoidable,
57
+ **stop and ask first** — state exactly what you will write and to which store —
58
+ and proceed only after explicit authorization. A backup is not a substitute for
59
+ authorization. Record in the report how verification stayed isolated (or the
60
+ authorization you obtained).
61
+
46
62
  ## Step 5 — Write the discipline reports (mandatory)
47
63
 
48
64
  Record the evidence of testing under `lawbook/changes/<name>/reports/`, one file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esneiderbravo/speclaw",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },