@onthink/prompt-observer 0.1.0 → 0.1.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.
@@ -10,6 +10,8 @@ Follow this contract after every user-requested task. Complete the task first, t
10
10
  4. Do not invent the model name, token counts, or cost. Use `null` values with `source: "unavailable"` unless the platform explicitly reports them. Use `source: "estimated"` only when a deterministic tokenizer or pricing tool produced the value, and name that tool in `estimation_method`.
11
11
  5. Base execution signals only on observed results. Do not claim a file changed or a test passed without evidence.
12
12
  6. Use schema version `1.0` and conform to `.prompt-observer/event.schema.json`.
13
+ 7. Do not manufacture criticism. If the prompt is clear and sufficient for the task, keep `weaknesses` and `improvement_suggestions` empty.
14
+ 8. Evaluate against objective task requirements, not personal preferences about wording, tone, verbosity, formatting, workflow, or technology choices.
13
15
 
14
16
  ## Required workflow
15
17
 
@@ -30,7 +32,7 @@ After completing a task:
30
32
  ```text
31
33
  Prompt Insight: <average>/10 — <short strength>
32
34
  Main weakness: <highest-impact weakness, or "No material weakness detected">
33
- Next time: <one actionable improvement>
35
+ Next time: <one actionable improvement, or "No change needed">
34
36
  ```
35
37
 
36
38
  Do not paste the complete JSON event into the user-facing response when persistence succeeds.
@@ -51,6 +53,15 @@ If writing files or running the logger is unavailable, do not pretend the event
51
53
 
52
54
  Score only prompt quality. Do not lower a score because implementation was difficult when the request itself was clear.
53
55
 
56
+ ## Evidence threshold and neutrality
57
+
58
+ - Record a weakness only when a concrete omission, ambiguity, contradiction, or constraint creates a meaningful risk of wrong execution, wasted work, or unverifiable completion.
59
+ - Do not require context, constraints, acceptance criteria, output formatting, or tests when they are unnecessary for the specific task.
60
+ - Do not criticize a prompt merely because it could be longer, more formal, more structured, or written in a style you prefer.
61
+ - Do not turn optional enhancements into weaknesses.
62
+ - When no material weakness exists, use an empty `weaknesses` array, an empty `improvement_suggestions` array, `Main weakness: No material weakness detected`, and `Next time: No change needed`.
63
+ - Positive scores must reflect the prompt as written; do not lower them just to create variation or appear critical.
64
+
54
65
  ## Event example
55
66
 
56
67
  ```json
@@ -60,26 +71,18 @@ Score only prompt quality. Do not lower a score because implementation was diffi
60
71
  "timestamp": "2026-09-01T12:00:00.000Z",
61
72
  "task_type": "coding",
62
73
  "prompt_summary": "Implement a dependency-free prompt observation kit with structured local logging.",
63
- "intent_clarity": 9,
64
- "context_sufficiency": 8,
65
- "scope_definition": 9,
66
- "constraints_quality": 9,
67
- "acceptance_criteria": 8,
68
- "verification_plan": 7,
74
+ "intent_clarity": 10,
75
+ "context_sufficiency": 10,
76
+ "scope_definition": 10,
77
+ "constraints_quality": 10,
78
+ "acceptance_criteria": 9,
79
+ "verification_plan": 9,
69
80
  "ambiguity_risk": "low",
70
81
  "strengths": [
71
82
  "The requested deliverables and runtime constraints are explicit."
72
83
  ],
73
- "weaknesses": [
74
- {
75
- "category": "missing_verification",
76
- "severity": "low",
77
- "message": "The exact expected report contents were not fully enumerated."
78
- }
79
- ],
80
- "improvement_suggestions": [
81
- "List the required report sections and one expected example."
82
- ],
84
+ "weaknesses": [],
85
+ "improvement_suggestions": [],
83
86
  "execution_signals": {
84
87
  "result_status": "completed",
85
88
  "files_changed": [
package/README.md CHANGED
@@ -4,6 +4,8 @@ Prompt Observer is a dependency-free observability kit for professional coding-a
4
4
 
5
5
  It is designed for Vibe Coding workflows and works without a browser extension, a local model, or an additional AI API. The agent already completing the task creates the observation.
6
6
 
7
+ [View the package on npm](https://www.npmjs.com/package/@onthink/prompt-observer)
8
+
7
9
  ## What it records
8
10
 
9
11
  - Prompt-quality dimensions: clarity, context, scope, constraints, acceptance criteria, and verification plan
@@ -13,6 +15,8 @@ It is designed for Vibe Coding workflows and works without a browser extension,
13
15
 
14
16
  Raw prompts, raw responses, private reasoning, system instructions, and secrets are prohibited from the event format.
15
17
 
18
+ Prompt Observer does not force criticism. A clear, sufficient prompt receives no fabricated weakness or subjective style advice; its `weaknesses` and `improvement_suggestions` arrays remain empty.
19
+
16
20
  ## Requirements
17
21
 
18
22
  - Node.js 20 or newer
@@ -21,14 +25,15 @@ Raw prompts, raw responses, private reasoning, system instructions, and secrets
21
25
 
22
26
  ## Quick start
23
27
 
24
- Clone this repository and initialize Prompt Observer in a target project:
28
+ Initialize Prompt Observer in any target project:
25
29
 
26
30
  ```powershell
27
- git clone <your-repository-url>
28
- cd prompt-observer
29
- node bin/prompt-observer.mjs init "E:\path\to\your-project"
31
+ cd "E:\path\to\your-project"
32
+ npx @onthink/prompt-observer init .
30
33
  ```
31
34
 
35
+ `init` adds a portable local CLI under `.prompt-observer`, so the target project can log events and generate reports without a global installation.
36
+
32
37
  Then add the following one-line instruction to the target project's existing agent-instruction file:
33
38
 
34
39
  ```md
@@ -78,17 +83,17 @@ The report includes average prompt health, recurring weaknesses, ambiguity risk,
78
83
 
79
84
  When an agent cannot write files, the contract requires it to show the three-line insight and return a complete valid JSON event in a fenced `json` block. It must state that the event was not persisted. A later extension or integration can capture that output automatically.
80
85
 
81
- ## npm package — coming soon
86
+ ## npm package
82
87
 
83
- The project is configured for npm packaging, but it is **not published yet**. The final package name will be chosen before release, preferably as a scoped name such as `@your-npm-username/prompt-observer`.
88
+ Prompt Observer is published as [`@onthink/prompt-observer`](https://www.npmjs.com/package/@onthink/prompt-observer).
84
89
 
85
- After publication, the intended installation flow will be:
90
+ Use it without installing it globally:
86
91
 
87
92
  ```powershell
88
- npx @your-npm-username/prompt-observer init .
93
+ npx @onthink/prompt-observer init .
89
94
  ```
90
95
 
91
- Before publishing, replace `@your-npm-username` with your real npm scope and configure the repository URL in `package.json`.
96
+ Running `init` again is safe: it preserves existing Prompt Observer files and adds only missing files.
92
97
 
93
98
  ## Development
94
99
 
@@ -97,7 +102,7 @@ npm run check
97
102
  npm test
98
103
  ```
99
104
 
100
- `prepublishOnly` runs both checks automatically before `npm publish`. The package uses only Node.js built-ins; JSONL is the source of truth for v1, while SQLite export is intentionally deferred to a later release.
105
+ `prepublishOnly` runs both checks automatically before `npm publish`. The package is published publicly under the `@onthink` scope. The project uses only Node.js built-ins; JSONL is the source of truth for v1, while SQLite export is intentionally deferred to a later release.
101
106
 
102
107
  ## License
103
108
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onthink/prompt-observer",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A dependency-free prompt observability contract and CLI for coding agents.",
5
5
  "keywords": [
6
6
  "ai",
@@ -30,6 +30,9 @@
30
30
  },
31
31
  "homepage": "https://github.com/daniialHZ/prompt-observer#readme",
32
32
  "license": "MIT",
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
33
36
  "files": [
34
37
  "bin/",
35
38
  "schema/",