@walwal-harness/cli 7.1.39 → 7.1.40

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.
@@ -50,6 +50,16 @@ OPS must actively watch the runtime while CQO evaluator workers test the product
50
50
  - CQO cannot issue PASS for a runnable product while OPS reports an open INCIDENT, missing runtime mapping, missing logs required by the mission, or an unmonitored service that is part of the tested scenario.
51
51
  - OPS does not wait for the Owner to notice defects. Owner acceptance starts only after CQO evidence and OPS runtime evidence are both clean, or after CEO explicitly reports remaining operational risk.
52
52
 
53
+ ## Dev-Mode Prompt Inspector
54
+
55
+ When OPS builds or runs a React/Next.js UI in development mode, and screen-level discussion would benefit from selecting visible UI elements and mapping intended REST/API behavior, OPS must use the installed `harness-ops-prompt-inspector` skill.
56
+
57
+ - Use Prompt Inspector only for development builds or verification environments. Do not inject it into production builds or production service environments.
58
+ - Install it from the project-local skill path under `.claude/skills/harness-ops-prompt-inspector/` or `.codex/skills/harness-ops-prompt-inspector/`; do not download it at mission runtime.
59
+ - Run its installer against the target app path before or during the dev-mode run so the toolbar is available in the browser for UI/API binding notes.
60
+ - Record the install result, target app path, dev server URL, and generated API discovery evidence in OPS environment evidence.
61
+ - If the project is not React/Next.js or the build is not development mode, report Prompt Inspector as not applicable instead of forcing installation.
62
+
53
63
  ## Post-Launch Watch
54
64
 
55
65
  After service launch, OPS continues the same monitoring duty against `runtime.production.services[]`.
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: harness-ops-prompt-inspector
3
+ description: "OPS-only dev-mode visual API binding for React/Next.js UI elements and REST endpoints."
4
+ permissionMode: bypassPermissions
5
+ ---
6
+
7
+ # OPS Prompt Inspector
8
+
9
+ OPS-only visual tool for binding UI elements to REST APIs in React/Next.js projects during development builds.
10
+
11
+ Use this skill only when OPS is responsible for a dev-mode build/run or verification environment where screen-level communication would be improved by an on-page inspector. Do not install it into production builds.
12
+
13
+ ## Quick Setup
14
+
15
+ **Recommended: Use the installation agent for seamless setup:**
16
+
17
+ ```
18
+ Task(
19
+ subagent_type="harness-ops-prompt-inspector:installer",
20
+ prompt="Install PromptInspector to <project_path>",
21
+ permissionMode="bypassPermissions"
22
+ )
23
+ ```
24
+
25
+ **Or run manually:**
26
+
27
+ ```bash
28
+ bash scripts/install.sh <project_path>
29
+ ```
30
+
31
+ This automatically:
32
+ 1. Detects project type (Next.js App/Pages Router)
33
+ 2. Copies component to `components/PromptInspector.tsx`
34
+ 3. Injects into root layout (dev mode only)
35
+ 4. Discovers all APIs in the project
36
+
37
+ ## Workflow
38
+
39
+ ```
40
+ 1. Setup → Run setup.py (auto-injects component)
41
+ 2. Discover → Run discover_apis.py (find all APIs)
42
+ 3. Bind → Select elements, configure API connections
43
+ 4. Export → Copy markdown spec for implementation
44
+ ```
45
+
46
+ ## Step 1: Discover APIs
47
+
48
+ ```bash
49
+ python3 scripts/discover_apis.py <project_path>
50
+ ```
51
+
52
+ Finds:
53
+ - Backend: Express, FastAPI, NestJS, Next.js API routes
54
+ - Frontend: axios, fetch, ky, SWR, React Query
55
+
56
+ ## Step 2: Visual Binding
57
+
58
+ After setup, toolbar appears at bottom-right in dev mode:
59
+
60
+ 1. **Select Element** → Click any UI element
61
+ 2. **Choose Action** → Comment Only / Connect API
62
+ 3. **Configure** (for API):
63
+ - Select API from discovered list
64
+ - Trigger: Mount, PageLoad, Click, Submit, Blur, Change
65
+ - OnSuccess: toast/popup/redirect + message
66
+ - OnError: Multiple cases with optional error codes
67
+ 4. **Export** → Copies markdown specification
68
+
69
+ ## Output Format
70
+
71
+ ```markdown
72
+ # Route: /users
73
+
74
+ ## 1. POST /api/users
75
+ - Selector: `button.submit-btn`
76
+ - Trigger: onClick
77
+ - OnSuccess: toast ("User created")
78
+ - OnError #1: [ERR_DUPLICATE] toast ("Already exists")
79
+ - OnError #2: toast ("Unknown error")
80
+
81
+ ## 2. Comment
82
+ - Selector: `#header`
83
+ - Comment: Needs redesign
84
+ ```
85
+
86
+ ## Manual Setup (if auto fails)
87
+
88
+ 1. Copy `assets/PromptInspector.tsx` to project's `components/`
89
+
90
+ 2. Add to root layout:
91
+ ```tsx
92
+ import { PromptInspector } from '@/components/PromptInspector';
93
+
94
+ // Inside layout, before </body>:
95
+ {process.env.NODE_ENV === 'development' && <PromptInspector />}
96
+ ```
97
+
98
+ ## Handler Templates
99
+
100
+ See [references/handler-templates.md](references/handler-templates.md) for code generation patterns.
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "prompt-inspector-installer",
3
+ "description": "Installs PromptInspector component with auto-update check. Handles file copying and layout injection without requiring individual permission prompts.",
4
+ "permissionMode": "bypassPermissions",
5
+ "tools": ["Read", "Write", "Edit", "Bash", "Glob"],
6
+ "prompt": "You are the Prompt Inspector installation agent. Your job is to:\n\n1. Run the setup script: `python3 scripts/setup.py <project_path> --force`\n2. Run the API discovery: `python3 scripts/discover_apis.py <project_path>`\n3. Report installation results to the user\n\nExecute these steps without asking for additional permissions."
7
+ }