kryptheon 0.1.4 → 0.1.6

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
@@ -1,105 +1,134 @@
1
- # kryptheon
2
-
3
- Record a flow in your app once, replay it after every AI change, and get told in
4
- plain English what broke.
5
-
6
- Runs entirely on your machine. No account, no API key, nothing leaves your
7
- computer. It is a wrapper around [Playwright](https://playwright.dev).
8
-
9
- Made by a 17-year-old vibecoder who kept having AI break things in his own app.
10
-
11
- ## Install
12
-
13
- ```
14
- npm i -D kryptheon
15
- ```
16
-
17
- Install it into your project, not globally — every recording imports
18
- `kryptheon/kryptheon-fixture`, and your tests can only find that if kryptheon is
19
- in your project's `node_modules`.
20
-
21
- ## Record
22
-
23
- ```
24
- npx kryptheon record https://your-app.example.com
25
- ```
26
-
27
- A browser opens. Use your app the way a customer would. Close the browser when
28
- you are done, and the recording is saved as a test.
29
-
30
- ## Check
31
-
32
- ```
33
- npx kryptheon check
34
- ```
35
-
36
- Runs everything you have recorded:
37
-
38
- ```
39
- OK Sign in (4.1s)
40
-
41
- X Checkout
42
- Could not find the button "Place order" on the page.
43
- This was working on 12 Mar at 9:14 AM.
44
- What to check: your last change may have renamed, hidden, or removed it.
45
- Where to look:
46
- - Browser was on: https://your-app.example.com/cart
47
- - POST /api/orders returned 500
48
- the server crashed or is unavailable - the error is in backend code, not the page
49
- ```
50
-
51
- Every failure ends with a short summary you can paste straight into an AI coding
52
- tool.
53
-
54
- ## Recording something that replays
55
-
56
- A recording is only useful if it still works the second time. So:
57
-
58
- - **Record one simple flow.** Sign in and look at a page. Open a thing and check
59
- it loaded. Short beats thorough.
60
- - **Sign in with an account that already exists.** Do not sign up during a
61
- recording — the account exists next time, and the signup step fails.
62
- - **Avoid steps that cannot repeat.** Adding data piles up a row on every run.
63
- Logging out at the end means the next run does not start where this one did.
64
-
65
- Kryptheon warns you about these after a recording, and names the exact step.
66
-
67
- ## Automatic checks
68
-
69
- The first time a test passes, kryptheon remembers where the browser ended up and
70
- what the page was called. If either changes later, the test fails and says what
71
- changed — so a recording catches regressions without you writing a single
72
- assertion.
73
-
74
- When a change is intentional, accept it for that one test:
75
-
76
- ```
77
- npx kryptheon accept "Checkout"
78
- ```
79
-
80
- `npx kryptheon accept` on its own lists what has been saved.
81
-
82
- ## Files it creates in your folder
83
-
84
- | File | What it is |
85
- | --- | --- |
86
- | `tests/` | your recordings |
87
- | `kryptheon-baselines.json` | the remembered result for each test |
88
- | `kryptheon-history.jsonl` | one line per run, used for "this was working on …" |
89
-
90
- A `.env` in the same folder is loaded automatically, and anything you type into a
91
- password box is replaced with an environment variable rather than written into
92
- the test.
93
-
94
- Worth adding to `.gitignore`: `.env`, `kryptheon-baselines.json`,
95
- `kryptheon-history.jsonl`, `test-results/`.
96
-
97
- ## Requirements
98
-
99
- Node 20.6 or later. Recording needs a real terminal window — it opens a browser,
100
- so it cannot run inside an AI coding assistant. The first run downloads a browser
101
- (about 200MB, once).
102
-
103
- ## Licence
104
-
105
- MIT
1
+ # kryptheon
2
+
3
+ Record a flow in your app once, replay it after every AI change, and get told in
4
+ plain English what broke.
5
+
6
+ Runs entirely on your machine. No account, no API key, nothing leaves your
7
+ computer. It is a wrapper around [Playwright](https://playwright.dev).
8
+
9
+ ## Install
10
+
11
+ ```
12
+ npm i -D kryptheon
13
+ ```
14
+
15
+ Install it into your project, not globally — every recording imports
16
+ `kryptheon/kryptheon-fixture`, and your tests can only find that if kryptheon is
17
+ in your project's `node_modules`.
18
+
19
+ ## Record
20
+
21
+ ```
22
+ npx kryptheon record https://your-app.example.com
23
+ ```
24
+
25
+ A browser opens. Use your app the way a customer would. Close the browser when
26
+ you are done, and the recording is saved as a test.
27
+
28
+ ## Check
29
+
30
+ ```
31
+ npx kryptheon check
32
+ ```
33
+
34
+ Runs everything you have recorded:
35
+
36
+ ```
37
+ OK Sign in (4.1s)
38
+
39
+ X Checkout
40
+ Could not find the button "Place order" on the page.
41
+ This was working on 12 Mar at 9:14 AM.
42
+ What to check: your last change may have renamed, hidden, or removed it.
43
+ Where to look:
44
+ - Browser was on: https://your-app.example.com/cart
45
+ - POST /api/orders returned 500
46
+ the server crashed or is unavailable - the error is in backend code, not the page
47
+ ```
48
+
49
+ Every failure ends with a short summary you can paste straight into an AI coding
50
+ tool.
51
+
52
+ ## Recording something that replays
53
+
54
+ A recording is only useful if it still works the second time. So:
55
+
56
+ - **Record one simple flow.** Sign in and look at a page. Open a thing and check
57
+ it loaded. Short beats thorough.
58
+ - **Sign in with an account that already exists.** Do not sign up during a
59
+ recording — the account exists next time, and the signup step fails.
60
+ - **Avoid steps that cannot repeat.** Adding data piles up a row on every run.
61
+ Logging out at the end means the next run does not start where this one did.
62
+
63
+ Kryptheon warns you about these after a recording, and names the exact step.
64
+
65
+ ## Make your AI assistant check its own work
66
+
67
+ An assistant will happily call a change done after only reading the code. This
68
+ writes a rule into the files assistants already read, so it has to run the check
69
+ first:
70
+
71
+ ```
72
+ npx kryptheon setup-ai
73
+ ```
74
+
75
+ It writes `CLAUDE.md`, `AGENTS.md` and `.cursorrules`. If a file already exists,
76
+ it adds a marked section at the end rather than overwriting anything, and
77
+ running it again replaces that section instead of adding a second copy.
78
+
79
+ The rule: after any change, run `npx kryptheon check`, show the output, and do
80
+ not report the work as done until it passes.
81
+
82
+ For an assistant running the check after every change, `--quiet` keeps the
83
+ conversation readable — one line when everything passes, the full explanation
84
+ only when something breaks:
85
+
86
+ ```
87
+ npx kryptheon check --quiet
88
+ ```
89
+
90
+ ```
91
+ OK 3 recordings still working.
92
+ ```
93
+
94
+ ## Automatic checks
95
+
96
+ The first time a test passes, kryptheon remembers where the browser ended up and
97
+ what the page was called. If either changes later, the test fails and says what
98
+ changed — so a recording catches regressions without you writing a single
99
+ assertion.
100
+
101
+ When a change is intentional, accept it for that one test:
102
+
103
+ ```
104
+ npx kryptheon accept "Checkout"
105
+ ```
106
+
107
+ `npx kryptheon accept` on its own lists what has been saved.
108
+
109
+ ## Files it creates in your folder
110
+
111
+ | File | What it is |
112
+ | --- | --- |
113
+ | `tests/` | your recordings |
114
+ | `kryptheon-baselines.json` | the remembered result for each test |
115
+ | `kryptheon-history.jsonl` | one line per run, used for "this was working on …" |
116
+
117
+ A `.env` in the same folder is loaded automatically, and anything you type into a
118
+ password box is replaced with an environment variable rather than written into
119
+ the test.
120
+
121
+ Worth adding to `.gitignore`: `.env`, `kryptheon-baselines.json`,
122
+ `kryptheon-history.jsonl`, `test-results/`.
123
+
124
+ ## Requirements
125
+
126
+ Node 20.6 or later. The first run downloads a browser (about 200MB, once).
127
+
128
+ Recording opens a browser window, so it needs a machine with a screen. It will
129
+ always try — if no window appears within 30 seconds it stops and says so,
130
+ rather than refusing up front.
131
+
132
+ ## Licence
133
+
134
+ MIT