@foldspace_npm/harness 0.1.12 → 0.1.13

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 (2) hide show
  1. package/CLAUDE.md +31 -15
  2. package/package.json +1 -1
package/CLAUDE.md CHANGED
@@ -35,7 +35,7 @@ something they can **see on their own page** — not at "it builds".
35
35
  Before an unfamiliar harness operation, `npx foldspace help --json` is the
36
36
  current CLI contract — risk, prerequisites, effects, next step.
37
37
 
38
- ## Aim at a level, then choose the cheapest experience that reaches it
38
+ ## The first session has a fixed order
39
39
 
40
40
  | Level | Reached when |
41
41
  |---|---|
@@ -43,15 +43,28 @@ current CLI contract — risk, prerequisites, effects, next step.
43
43
  | **L1 · read settings** | the user's own account, plan or settings in a widget, showing their real values |
44
44
  | **L2 · look up entities** | a search from the user's own words, showing rows |
45
45
 
46
- Navigation, uploads, extraction and anything that writes are a later session.
47
- Say the target out loud, then offer three or four read-only experiences that
48
- reach it, **cheapest first**: an endpoint the profile already verifies the
49
- user's own data with no parameter (L1) a search with one parameter (L2).
50
- `discover_actions` gives candidates, not an inventory.
46
+ 1. **Get the agent live first (L0) - with no actions.** Straight after
47
+ orienting: `npm run build`, `npm run inject`, the human signs in to their
48
+ app, then `npx foldspace attach --daemon`. An empty registry is valid. L0
49
+ is `registration_ok` with the agent visible on their page - tell them to
50
+ look at it and say hello to it. **Do not explore the app first**: no
51
+ reading its bundle, no watching its traffic, no browsing its screens.
52
+ Nothing about L0 needs any of it, and minutes of silent investigation
53
+ before the human has seen anything is the wrong first impression.
54
+ 2. **Then offer experiences - from what you already have.** With the agent on
55
+ their screen, offer three or four read-only experiences as a choice,
56
+ recommended first. Sources: the conversation starters seeded at sign-up,
57
+ `discover_actions`, and `docs/app-profile.md`. `discover_actions` gives
58
+ candidates, not an inventory. Do not investigate the app to build this
59
+ list. Order them cheapest first: the user's own data with no parameter
60
+ (L1) before a search with one parameter (L2).
61
+ 3. **Only then observe - and only what the chosen experience needs** (**Find
62
+ the call yourself**). Check the row count as part of that: an experience
63
+ on a resource the account has zero of is a demo of an empty state, so say
64
+ so and offer the next one. On an empty account the useful first action is
65
+ one that creates data - say so instead.
51
66
 
52
- **Check row counts before recommending.** An experience on a resource the
53
- account has zero of is a demo of an empty state. On an empty account the useful
54
- first action is one that creates data — say so instead.
67
+ Navigation, uploads, extraction and anything that writes are a later session.
55
68
 
56
69
  ### Ask as a choice, and ask almost nothing
57
70
 
@@ -73,10 +86,12 @@ and asking are not the only options — **observing is, and it comes first**:
73
86
 
74
87
  1. **Already known** — `docs/app-profile.md`. A verified endpoint needs no
75
88
  browsing.
76
- 2. **You drive.** `npm run inject`, the human signs in, and *you* go to the
77
- screen: read the app's bundle for API paths and watch the requests it makes
78
- (chrome-devtools MCP against the inject Chrome, or a page-context `fetch`,
79
- **before** `attach` owns the debug port). Read the auth method off a request
89
+ 2. **You drive - once they have chosen an experience.** The agent is already
90
+ attached from L0, and `attach` owns the debug port: `npx foldspace attach
91
+ --stop` first. Then *you* go to the one screen that experience needs: read
92
+ the app's bundle for API paths and watch the requests it makes
93
+ (chrome-devtools MCP against the inject Chrome, or a page-context
94
+ `fetch`). Attach again when you have the call. Read the auth method off a request
80
95
  the page already sent — bearer from `localStorage`, cookie, custom header.
81
96
  Delegate the watching to a read-only subagent so the traffic does not flood
82
97
  your context.
@@ -172,8 +187,9 @@ npx foldspace attach --daemon
172
187
  ```
173
188
 
174
189
  `inject` launches an isolated Chrome profile and records its debug port; it
175
- loads nothing. Observe after inject and **before** attach, while chrome-devtools
176
- MCP can use the same Chrome. `attach` prepares the page and loads the local
190
+ loads nothing. In a first session `attach` comes straight after sign-in (L0);
191
+ to observe afterwards, `attach --stop`, use chrome-devtools MCP against the
192
+ same Chrome, then attach again. `attach` prepares the page and loads the local
177
193
  `dist/index.js` over CDP. Coding agents use `--daemon` so the tool returns after
178
194
  `[lifecycle] inspect_registration:…`. An empty local registry is valid; `npm run
179
195
  build` is still required so `dist/index.js` exists.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foldspace_npm/harness",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Build and verify portable Foldspace action artifacts against a live app.",
5
5
  "type": "module",
6
6
  "bin": {