tamperward 2.19.0 → 2.20.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.
Files changed (3) hide show
  1. package/README.md +33 -27
  2. package/dist/cli/index.js +679 -373
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -89,6 +89,9 @@ judged. In architectural terms, Tamperward separates **steering** from
89
89
  "pristine" verification restores the protected verification state from the
90
90
  trusted starting point and runs the checks again.
91
91
 
92
+ For the complete component map, trust boundaries, data flows, and deployment
93
+ surfaces, see [the full architecture diagram](./docs/architecture.md).
94
+
92
95
  > **Core invariant:** the agent may author the candidate tree, but it must not
93
96
  > choose the trusted baseline, the governing policy, the verifier, or the final
94
97
  > verdict.
@@ -110,31 +113,28 @@ trusted starting point and runs the checks again.
110
113
  ### The local enforcement envelope
111
114
 
112
115
  ```mermaid
113
- flowchart TB
114
- subgraph R["tamperward run — outer enforcement envelope"]
115
- E["Capture entry state"]
116
- subgraph U["Agent-controlled lifecycle"]
117
- H["In-loop steering hooks"]
118
- A["Agent runtime"]
119
- W["Candidate HEAD and worktree"]
120
- H -.-> A
121
- A --> W
122
- end
123
- J["Post-exit adjudication"]
124
- C["Committed and worktree checks"]
125
- V["Visible and pristine verification"]
126
- Q["Ancestry, dependency drift, quiescence"]
127
- X["Final exit verdict"]
128
- E --> A
129
- E --> J
130
- W --> J
131
- J --> C
132
- J --> V
133
- J --> Q
134
- C --> X
135
- V --> X
136
- Q --> X
137
- end
116
+ graph TD
117
+ entry["Trusted entry snapshot"]
118
+ hooks["In-loop hooks and observer"]
119
+ agent["Agent runtime"]
120
+ tree["Candidate commit and worktree"]
121
+ adjudicate["Post-exit adjudication"]
122
+ checks["Diff and worktree checks"]
123
+ verify["Visible and pristine verification"]
124
+ integrity["Ancestry dependency and quiescence"]
125
+ verdict["Final exit verdict"]
126
+
127
+ entry --> agent
128
+ hooks --> agent
129
+ agent --> tree
130
+ entry --> adjudicate
131
+ tree --> adjudicate
132
+ adjudicate --> checks
133
+ adjudicate --> verify
134
+ adjudicate --> integrity
135
+ checks --> verdict
136
+ verify --> verdict
137
+ integrity --> verdict
138
138
  ```
139
139
 
140
140
  Before starting the agent, the envelope
@@ -577,12 +577,12 @@ option can never be reinterpreted as the agent command.
577
577
 
578
578
  ### The rules
579
579
 
580
- Seventeen rules are specified and sixteen ship (see the table in
580
+ Eighteen rules are specified and seventeen ship (see the table in
581
581
  [SPEC.md](./SPEC.md)). The families: test protection (`test-deletion`,
582
582
  `test-skip`, `test-content-removal`, plus the warning-only JS/TS
583
583
  `assertion-weakening` heuristic), verification-signal protection
584
584
  (`coverage-lowering`, `snapshot-rewrite`, `snapshot-only-rewrite`), suppression
585
- (`ts-any-cast`, `ts-any-launder`, `lint-suppression`), pipeline protection
585
+ (`ts-any-cast`, `ts-any-launder`, `ts-cast-growth`, `lint-suppression`), pipeline protection
586
586
  (`ci-tampering`, `hook-tampering`, `no-verify`), and the effect/outcome layers
587
587
  (`transient-protected-mutation`, `pristine-verification`, plus the `run` envelope).
588
588
  `test-skip` keeps the established regex coverage for diff-only inputs and non-JS
@@ -598,6 +598,12 @@ specificity removed, or a pure assertion removed from the same suite-qualified
598
598
  test. It measured 12/12 true-positive fires with 0/20 false positives on the
599
599
  committed detector-specific replay and remains `warn`; `guard-removal` is still
600
600
  reserved with no detector, and `ts-any-launder` is a permanent warn.
601
+ `ts-cast-growth` (2.20.0) is the assertion budget: net growth of ordinary `as T` /
602
+ `<T>x` / `x!` assertions in non-test source, counted on the AST net of casts the same
603
+ change removed, reported as a warning that never blocks by default. It fires on 8.7%
604
+ of legitimate mainline pairs across four real TypeScript libraries
605
+ (`harness/fp-study/CAST-GROWTH-CORPUS.md`), so block is closed by corpus; the same
606
+ pass removed every assertion from TamperWard's own `src/` (`docs/CAST-INVENTORY.md`).
601
607
 
602
608
  ## What Tamperward does not do
603
609