pi-eda 0.2.1 → 0.2.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Shivam V Verma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -15,8 +15,10 @@ cold, as if returning in 6 months having forgotten everything.
15
15
  - Comprehension only -- you never judge whether a choice was right, only
16
16
  whether it's explained.
17
17
  - Confirm every figure file passed to you is actually embedded in the
18
- report -- an unreferenced figure is material-tier, since there isn't an
19
- interpretation for it.
18
+ report. An unreferenced figure is material-tier, since there isn't an
19
+ interpretation for it. Intentional or deliberate omission is not an
20
+ exception. This holds unless the report itself documents that the
21
+ user explicitly said to exclude that figure.
20
22
 
21
23
  ## Severity rubric
22
24
 
@@ -25,7 +27,7 @@ cold, as if returning in 6 months having forgotten everything.
25
27
  | cosmetic | wording/labeling nit, doesn't change interpretation |
26
28
  | confusing | correct and complete, but too dense/jargon-heavy to parse easily |
27
29
  | clarifying | you can't tell why/what/how from the report alone. If you had to open the script to answer your own question, that's automatic clarifying-tier |
28
- | material | your conclusion contradicts what the report claims, or the claim isn't backed by anything shown |
30
+ | material | your conclusion contradicts what the report claims, the claim isn't backed by anything shown, or a figure is omitted |
29
31
 
30
32
  Report every finding with its tier. Do not silently decide a fix for
31
33
  anything -- that's the calling agent's call, not yours.
@@ -197,6 +197,10 @@ export default function (pi: ExtensionAPI) {
197
197
  }
198
198
  case "status": {
199
199
  result = handleStatus(graph, current, graphPath);
200
+ if (!graph && current) {
201
+ result.error =
202
+ "graph not loaded -- current state was reconstructed but the graph file is unavailable; call init to reload";
203
+ }
200
204
  break;
201
205
  }
202
206
  case "clear": {
@@ -93,9 +93,9 @@ export default function (pi: ExtensionAPI) {
93
93
  const text = result.content[0];
94
94
  return new Text(text?.type === "text" ? text.text : "", 0, 0);
95
95
  }
96
- return new Image(details.base64, details.mediaType, theme, {
96
+ return new Image(details.base64, details.mediaType, { fallbackColor: (text: string) => theme.fg("muted", text) }, {
97
97
  maxWidthCells: 80,
98
- maxHeightCells: 24,
98
+ maxHeightCells: 36,
99
99
  });
100
100
  },
101
101
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-eda",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Pi tooling for interactive exploratory data analysis.",
5
5
  "license": "MIT",
6
6
  "author": "Shivam V Verma",
@@ -16,6 +16,7 @@
16
16
  ],
17
17
  "files": [
18
18
  "README.md",
19
+ "LICENSE",
19
20
  "agents",
20
21
  "eda.mplstyle.example",
21
22
  "extensions",
@@ -9,8 +9,7 @@
9
9
  "Reread and run script": ["Build script/plot", "Summarize the answer"],
10
10
  "Dispatch script-checker": ["Build script/plot", "Dispatch job-runner"],
11
11
  "Dispatch job-runner": ["Summarize the answer"],
12
- "Summarize the answer": ["Continue analysis or lock in?"],
13
- "Continue analysis or lock in?": [
12
+ "Summarize the answer": [
14
13
  "Propose/ask a question",
15
14
  "/skill:finishing-exploratory-data-analysis"
16
15
  ]
@@ -146,14 +146,10 @@ Heavy path continuation: launch the `job-runner` only once the
146
146
  - `show` the figure(s) to the user, then summarize briefly with bullets.
147
147
  - Core principle: the user decides the interpretation. Continue interrogating
148
148
  the user until it makes sense to you and is consistent with the dataset.
149
- - `advance` condition: you understand the user's interpretation of the figure.
150
-
151
- ### `Continue analysis or lock in?`
152
-
153
- - Ask the user whether to continue with another question or lock in the
154
- analysis; keep interrogating until they pick one. "Next question" loops back
155
- to `Propose/ask a question`, "finish analysis" exits to the finishing skill.
156
- - `advance` condition: the user has decided to continue the session or finish it.
149
+ - Once the user makes a clear interpretation, ask whether to continue with another
150
+ question or lock in the analysis. Keep interrogating until they pick one.
151
+ - `advance` condition: you understand the user's interpretation of the
152
+ figure, and the user has decided to continue the session or finish it.
157
153
 
158
154
  ### `/skill:finishing-exploratory-data-analysis`
159
155
 
@@ -45,7 +45,9 @@ review doesn't count (see Common Mistakes).
45
45
  - *Data source(s) used*
46
46
  - *Questions*, grouped when closely related:
47
47
  - *Approach* in prose, with key equations if nontrivial
48
- - *Results*, with the embedded figure(s)
48
+ - *Results*, with the embedded figure(s): all figures produced
49
+ during the EDA must be embedded; omitting one requires the
50
+ user's explicit consent.
49
51
  - *Conclusion*
50
52
  4. **Reread, then dispatch verification.** See `verification-dispatch.md`
51
53
  for the reread pass, the `naive-reader`/`critical-auditor` dispatch, and
@@ -68,3 +70,4 @@ review doesn't count (see Common Mistakes).
68
70
  | Silently patching a material-tier or `critical-auditor` finding before telling the user | Always surface these verbatim in the summary, even unresolved -- only cosmetic/confusing/non-fabricated-clarifying fixes get silently applied |
69
71
  | Treating a completed script/code review as satisfying this checkpoint's dispatch | Different gate, different artifact -- a code review checks the script, this checkpoint checks the written report. See `verification-dispatch.md` |
70
72
  | Saying an analysis is "done and reviewed" once code review passes, before the lock-in checkpoint has run | Say so explicitly ("script validated; report still needs the lock-in checkpoint") rather than a blanket "done" that could be read as covering sign-off too |
73
+ | Omitting a figure without the user's explicit consent | Embed every figure; only skip one if the user explicitly says to |