@walwal-harness/cli 7.1.39 → 7.1.41
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/HR-Resource/cdo/SKILL.md +9 -1
- package/HR-Resource/ceo/SKILL.md +33 -2
- package/HR-Resource/coo/SKILL.md +9 -1
- package/HR-Resource/cqo/SKILL.md +9 -1
- package/HR-Resource/cto/SKILL.md +10 -2
- package/HR-Resource/ops/SKILL.md +20 -2
- package/HR-Resource/ops-prompt-inspector/SKILL.md +105 -0
- package/HR-Resource/ops-prompt-inspector/agents/installation-agent.json +7 -0
- package/HR-Resource/ops-prompt-inspector/assets/PromptInspector.tsx +599 -0
- package/HR-Resource/ops-prompt-inspector/assets/prompt-inspector-static.js +180 -0
- package/HR-Resource/ops-prompt-inspector/references/handler-templates.md +255 -0
- package/HR-Resource/ops-prompt-inspector/scripts/discover_apis.py +509 -0
- package/HR-Resource/ops-prompt-inspector/scripts/install.sh +32 -0
- package/HR-Resource/ops-prompt-inspector/scripts/setup.py +381 -0
- package/apps/harness-dashboard/app/api/wake/route.ts +41 -0
- package/apps/harness-dashboard/components/Scene.tsx +568 -35
- package/apps/harness-dashboard/lib/__tests__/harness-state.test.ts +1 -202
- package/apps/harness-dashboard/lib/__tests__/sandbox-e2e.test.ts +490 -0
- package/apps/harness-dashboard/lib/harness-state.ts +107 -796
- package/apps/harness-dashboard/lib/types.ts +22 -222
- package/apps/harness-dashboard/playwright.config.ts +26 -7
- package/assets/templates/AGENTS-ko.md.template +1 -1
- package/assets/templates/AGENTS.md.template +12 -2
- package/assets/templates/HARNESS.md +2 -0
- package/assets/templates/company-pipeline-manifest.json +5 -14
- package/assets/templates/worker-report.md.template +38 -0
- package/bin/init.js +4 -3
- package/commands/goal.md +4 -2
- package/commands/hot-fix.md +1 -1
- package/commands/submission.md +1 -1
- package/package.json +1 -1
- package/scripts/conductor-tick.sh +12 -0
- package/scripts/harness-agenda.sh +105 -0
- package/scripts/harness-company-block.sh +89 -0
- package/scripts/harness-company-complete.sh +17 -8
- package/scripts/harness-company-cycle.sh +54 -0
- package/scripts/harness-progress-set.sh +8 -2
- package/scripts/harness-stop.sh +76 -0
- package/scripts/harness-wake-control.sh +151 -0
- package/scripts/harness-wake.sh +5 -0
- package/apps/harness-dashboard/components/Drawer.tsx +0 -146
- package/apps/harness-dashboard/components/Header.tsx +0 -40
- package/apps/harness-dashboard/components/MissionTimeline.tsx +0 -214
- package/apps/harness-dashboard/components/OrgTree.tsx +0 -459
- package/apps/harness-dashboard/components/drawer/AgentLogTab.tsx +0 -56
- package/apps/harness-dashboard/components/drawer/DesignPreviewTab.tsx +0 -160
- package/apps/harness-dashboard/components/drawer/GotchasTab.tsx +0 -89
- package/apps/harness-dashboard/components/drawer/HypothesisTab.tsx +0 -42
- package/apps/harness-dashboard/components/drawer/IncidentsTab.tsx +0 -50
- package/apps/harness-dashboard/components/drawer/MissionDocTab.tsx +0 -96
- package/apps/harness-dashboard/components/drawer/MissionFlowTab.tsx +0 -576
- package/apps/harness-dashboard/components/drawer/OwnerHistoryTab.tsx +0 -160
- package/apps/harness-dashboard/components/drawer/RoomMetricsTab.tsx +0 -90
- package/apps/harness-dashboard/components/drawer/TracksTab.tsx +0 -47
- package/apps/harness-dashboard/components/three/ArchiveBoxes.tsx +0 -95
- package/apps/harness-dashboard/components/three/DeptBoard.tsx +0 -175
- package/apps/harness-dashboard/components/three/Floor3D.tsx +0 -404
- package/apps/harness-dashboard/components/three/GoalCard3D.tsx +0 -123
- package/apps/harness-dashboard/components/three/HypothesisCards.tsx +0 -71
- package/apps/harness-dashboard/components/three/MeetingWhiteboard.tsx +0 -98
- package/apps/harness-dashboard/components/three/Minifig3D.tsx +0 -391
- package/apps/harness-dashboard/components/three/OpsSiren.tsx +0 -99
- package/apps/harness-dashboard/components/three/Stage3D.tsx +0 -104
- package/apps/harness-dashboard/components/three/TrackRibbons.tsx +0 -81
- package/apps/harness-dashboard/lib/__tests__/i18n.test.ts +0 -16
- package/apps/harness-dashboard/lib/__tests__/iso.test.ts +0 -42
- package/apps/harness-dashboard/lib/__tests__/state-mapping.test.ts +0 -183
- package/apps/harness-dashboard/lib/agent-roster.ts +0 -42
- package/apps/harness-dashboard/lib/furniture.ts +0 -165
- package/apps/harness-dashboard/lib/i18n.ts +0 -26
- package/apps/harness-dashboard/lib/iso.ts +0 -150
- package/apps/harness-dashboard/lib/markdown.tsx +0 -306
- package/apps/harness-dashboard/lib/path-planning.ts +0 -72
- package/apps/harness-dashboard/lib/state-mapping.ts +0 -146
package/HR-Resource/cdo/SKILL.md
CHANGED
|
@@ -27,7 +27,15 @@ Before design work, read `.harness/conventions/shared.md`, `.harness/conventions
|
|
|
27
27
|
|
|
28
28
|
## Worker Activity Telemetry
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
When CEO routes this mission to you, set yourself as the live agent on entry so the dashboard shows the handoff: `bash scripts/harness-progress-set.sh . '.current_agent="cdo" | .agent_status="running"'`.
|
|
31
|
+
|
|
32
|
+
Before launching any fresh worker session, update `.harness/progress.json` with `scripts/harness-progress-set.sh` so dashboards can show the worker as active. Record the worker name, owning CXX, report path, and `status:"running"` under `company_state.workers`, increment `company_state.active_workers`, and set `conductor.current_action` to `spawn:{worker-name}`. After the worker report is accepted, update that worker to `status:"complete"` and decrement `active_workers`. Do not leave `active_workers:0` while a worker session is running. Require every worker report to open with a `## Status` line whose body is `IN_PROGRESS` while the worker runs and `COMPLETE` once the report is final, so the dashboard shows true worker liveness instead of guessing from file timestamps.
|
|
33
|
+
|
|
34
|
+
On exit, after writing `cdo.md` and handing back to CEO, run `bash scripts/harness-progress-set.sh . '.agent_status="completed"'` so the loop advances and the dashboard reflects the finished step. Do not clear `conductor.state`; only the CEO's Company Loop Termination step ends the loop.
|
|
35
|
+
|
|
36
|
+
## Operating Mode — Status Briefing & Agenda
|
|
37
|
+
|
|
38
|
+
When the active goal is operating (perpetual, `mission-state.json` lifecycle `operating`), CEO periodically orders a 현황 보고. In it, confirm — with worker-backed evidence — whether your hired workers' live deliverables still operate correctly toward the goal (for CDO: is the shipped UI/UX/brand still consistent and usable?). If you discover a regression, drift, incident, opportunity, or risk, do not silently fix it or sit on it: raise it as an agenda item so CEO can adjudicate and route the next cycle: `bash scripts/harness-agenda.sh . <goal-rel> raise cdo <kind> "<title>" "<evidence-path>"` (kinds: loss, drift, incident, opportunity, risk, verification-gap). When CEO routes a decided agenda item to you, execute it through hired workers, get CQO verification where behavior must be proven, and report so CEO can close the item.
|
|
31
39
|
|
|
32
40
|
## Rule
|
|
33
41
|
|
package/HR-Resource/ceo/SKILL.md
CHANGED
|
@@ -32,6 +32,37 @@ CEO is authorized to approve routine company operations without Owner confirmati
|
|
|
32
32
|
|
|
33
33
|
If an operational choice is reversible and uses existing project-local credentials or configuration, CEO decides, records the rationale in `ceo.md`, and continues. Escalate only for new secrets, new spending, legal/business acceptance, unavailable external production access, destructive data action, or a direct conflict with the Owner's stated direction.
|
|
34
34
|
|
|
35
|
+
## Company Loop Termination
|
|
36
|
+
|
|
37
|
+
There are exactly two legitimate ways to end the company loop, and each requires an explicit **runtime transition**. Writing `ceo.md` and `mission-state.json` is not enough: the autonomous Stop loop and the dashboard read `progress.json` runtime state (`conductor.state`, `agent_status`, `current_agent`), not your documents. If you finish a report but never fire the transition, the loop stays `running` and the harness keeps prompting you to continue — this is the "is it done or not?" ambiguity. Avoid it by always ending in one of these two states:
|
|
38
|
+
|
|
39
|
+
1. **COMPLETE** — the mission is genuinely finished: the final Owner report is in `ceo.md`, all required CXX/worker/OPS evidence is collected, and `mission-state.json` is terminal (`complete`/`closed`/`cancelled`/`superseded`) with `active:false`. As the **literal final action of the turn**, run:
|
|
40
|
+
`bash scripts/harness-company-complete.sh . <reason>`
|
|
41
|
+
2. **BLOCKED on external authority** — the next action genuinely needs authority the harness cannot infer or obtain (new credentials/secrets, payment approval, legal/business acceptance, unavailable production access, destructive data action, or a direct conflict with the Owner's stated direction). Record the exact missing authority and the internally recommended default in `ceo.md`, set `mission-state.json` lifecycle `blocked` with `active:false`, then run:
|
|
42
|
+
`bash scripts/harness-company-block.sh . "<exact missing authority>"`
|
|
43
|
+
|
|
44
|
+
`Truly done = final Owner report + terminal mission-state.json + the matching runtime transition fired.` Until one of these two transitions runs, the mission is still in progress: keep routing CXX and worker work autonomously between turns. Never fire the completion transition while real CXX/worker/verification work remains, and never end a turn in the `running` state with no further action queued.
|
|
45
|
+
|
|
46
|
+
**Completion applies only to FINITE goals.** A perpetual/operating goal (next section) NEVER completes — `harness-company-complete.sh` must not be run for it.
|
|
47
|
+
|
|
48
|
+
## Operating (Perpetual) Goals — the never-ending company loop
|
|
49
|
+
|
|
50
|
+
First, **classify the goal**:
|
|
51
|
+
|
|
52
|
+
- **Finite** goal — "build X", "add Y", "fix Z": has a definite done state. Use the Company Loop Termination above.
|
|
53
|
+
- **Operating (perpetual)** goal — "run/operate/monitor/keep growing X", "지속/영구 운영", "make money continuously", anything that should *never* stop (e.g. "build a trading bot and keep it profitable forever"): it must run as a standing company that cycles indefinitely.
|
|
54
|
+
|
|
55
|
+
For an operating goal, set `mission-state.json` to `{"lifecycle":"operating","active":true}` (it stays active forever) and **never** call `harness-company-complete.sh`. The only ways an operating goal ends are: the Owner explicitly orders it stopped (then run `harness-company-complete.sh`), or a true external-authority block (then `harness-company-block.sh`).
|
|
56
|
+
|
|
57
|
+
Run it as an **agenda-driven standing executive loop**. The agenda is the shared meetup file every CXX co-writes at `.harness/documents/{goal}/agenda.json`, managed with `scripts/harness-agenda.sh`. Each operating tick:
|
|
58
|
+
|
|
59
|
+
1. **Read the agenda** (`scripts/harness-agenda.sh . {goal} list`).
|
|
60
|
+
2. **If there are active items**, you are *forced* to drive them: for every `open` item, decide and record the decision (`scripts/harness-agenda.sh . {goal} decide <id> "<decision>" <owning-cxx>`), then route that CXX to execute through hired workers and CQO-verify; when an item's work is done and verified, close it (`... close <id>`). Do not end the turn with active agenda.
|
|
61
|
+
3. **If the agenda is empty ("보고사항 없음")**, run a **status-briefing round**: require each relevant CXX (COO/CDO/CTO/CQO/OPS) to file a 현황 보고 — confirm that its workers' *live deliverables* still operate correctly toward the goal — and to raise any newly discovered loss/drift/opportunity/risk as a new agenda item (`scripts/harness-agenda.sh . {goal} raise <cxx> <kind> "<title>" "<evidence>"`). This is how the company discovers its own next work.
|
|
62
|
+
4. **If a full briefing round genuinely surfaces nothing**, record the operating heartbeat (`scripts/harness-company-cycle.sh . {goal}`) and end the turn — the hourly wake loop resumes the next cycle. This keeps the company always-on without burning a turn spinning.
|
|
63
|
+
|
|
64
|
+
The canonical operating cycle for a self-improving system: `OPS monitor → on loss/drift/opportunity, COO researches + backtests a new strategy → CTO applies it safely → CQO verifies → OPS operates and watches → (repeat)`. Losses are not failures to report to the Owner; they are agenda items that trigger the next research→apply→operate cycle autonomously.
|
|
65
|
+
|
|
35
66
|
## Lazy Rule Loading
|
|
36
67
|
|
|
37
68
|
Before routing or accepting CXX work, enforce lazy loading:
|
|
@@ -51,8 +82,8 @@ Before routing or accepting CXX work, enforce lazy loading:
|
|
|
51
82
|
- CTO: architecture, platform, API, account, web/app/backend/frontend wiring.
|
|
52
83
|
- CQO: quality gates, e2e/backtest strategy, regression and archive criteria.
|
|
53
84
|
- OPS: build/service environment monitoring, CQO verification watch, port map checks, launch observation, production watch, and exception monitoring.
|
|
54
|
-
4. Route completed outputs to the next responsible CXX.
|
|
55
|
-
5. Report outcomes, final acceptance requests, and true external-authority blocks to the Owner.
|
|
85
|
+
4. Route completed outputs to the next responsible CXX. Keep `progress.json` `current_agent` honest as you route so the dashboard shows the live handoff: each CXX sets `current_agent` to its own role on entry; set it back with `bash scripts/harness-progress-set.sh . '.current_agent="ceo" | .agent_status="running"'` whenever you resume between CXX steps and before the final report.
|
|
86
|
+
5. Report outcomes, final acceptance requests, and true external-authority blocks to the Owner, then fire the Company Loop Termination transition (complete or blocked).
|
|
56
87
|
|
|
57
88
|
## Hard Rules
|
|
58
89
|
|
package/HR-Resource/coo/SKILL.md
CHANGED
|
@@ -37,7 +37,15 @@ During planning, COO must determine whether the active runtime exposes MCP serve
|
|
|
37
37
|
|
|
38
38
|
## Worker Activity Telemetry
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
When CEO routes this mission to you, set yourself as the live agent on entry so the dashboard shows the handoff: `bash scripts/harness-progress-set.sh . '.current_agent="coo" | .agent_status="running"'`.
|
|
41
|
+
|
|
42
|
+
Before launching any fresh worker session, update `.harness/progress.json` with `scripts/harness-progress-set.sh` so dashboards can show the worker as active. Record the worker name, owning CXX, report path, and `status:"running"` under `company_state.workers`, increment `company_state.active_workers`, and set `conductor.current_action` to `spawn:{worker-name}`. After the worker report is accepted, update that worker to `status:"complete"` and decrement `active_workers`. Do not leave `active_workers:0` while a worker session is running. Require every worker report to open with a `## Status` line whose body is `IN_PROGRESS` while the worker runs and `COMPLETE` once the report is final, so the dashboard shows true worker liveness instead of guessing from file timestamps.
|
|
43
|
+
|
|
44
|
+
On exit, after writing `coo.md` and handing back to CEO, run `bash scripts/harness-progress-set.sh . '.agent_status="completed"'` so the loop advances and the dashboard reflects the finished step. Do not clear `conductor.state`; only the CEO's Company Loop Termination step ends the loop.
|
|
45
|
+
|
|
46
|
+
## Operating Mode — Status Briefing & Agenda
|
|
47
|
+
|
|
48
|
+
When the active goal is operating (perpetual, `mission-state.json` lifecycle `operating`), CEO periodically orders a 현황 보고. In it, confirm — with worker-backed evidence — whether your hired workers' live deliverables still operate correctly toward the goal (for COO: is the current strategy/plan still valid and performing in research/backtest?). If you discover a loss, drift, regression, incident, opportunity, or risk, do not silently fix it or sit on it: raise it as an agenda item so CEO can adjudicate and route the next cycle: `bash scripts/harness-agenda.sh . <goal-rel> raise coo <kind> "<title>" "<evidence-path>"` (kinds: loss, drift, incident, opportunity, risk, verification-gap). When CEO routes a decided agenda item to you, execute it through hired workers, get CQO verification where behavior must be proven, and report so CEO can close the item.
|
|
41
49
|
|
|
42
50
|
## Non-Execution Rule
|
|
43
51
|
|
package/HR-Resource/cqo/SKILL.md
CHANGED
|
@@ -26,7 +26,15 @@ Before quality work, read `.harness/conventions/shared.md`, `.harness/convention
|
|
|
26
26
|
|
|
27
27
|
## Worker Activity Telemetry
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
When CEO routes this mission to you, set yourself as the live agent on entry so the dashboard shows the handoff: `bash scripts/harness-progress-set.sh . '.current_agent="cqo" | .agent_status="running"'`.
|
|
30
|
+
|
|
31
|
+
Before launching any fresh worker session, update `.harness/progress.json` with `scripts/harness-progress-set.sh` so dashboards can show the worker as active. Record the worker name, owning CXX, report path, and `status:"running"` under `company_state.workers`, increment `company_state.active_workers`, and set `conductor.current_action` to `spawn:{worker-name}`. After the worker report is accepted, update that worker to `status:"complete"` and decrement `active_workers`. Do not leave `active_workers:0` while a worker session is running. Require every worker report to open with a `## Status` line whose body is `IN_PROGRESS` while the worker runs and `COMPLETE` once the report is final, so the dashboard shows true worker liveness instead of guessing from file timestamps.
|
|
32
|
+
|
|
33
|
+
On exit, after writing `cqo.md` and handing back to CEO, run `bash scripts/harness-progress-set.sh . '.agent_status="completed"'` so the loop advances and the dashboard reflects the finished step. Do not clear `conductor.state`; only the CEO's Company Loop Termination step ends the loop.
|
|
34
|
+
|
|
35
|
+
## Operating Mode — Status Briefing & Agenda
|
|
36
|
+
|
|
37
|
+
When the active goal is operating (perpetual, `mission-state.json` lifecycle `operating`), CEO periodically orders a 현황 보고. In it, confirm — with evaluator-worker evidence — whether the live system still passes the quality/regression bar toward the goal (for CQO: are regression/e2e/perf/security gates still green on the running system?). If you discover a regression, quality drift, incident, or verification gap, do not silently sit on it: raise it as an agenda item so CEO can adjudicate and route the next cycle: `bash scripts/harness-agenda.sh . <goal-rel> raise cqo <kind> "<title>" "<evidence-path>"` (kinds: loss, drift, incident, opportunity, risk, verification-gap). When CEO routes a decided agenda item to you, run the evaluator/tester workers, issue a verdict, and report so CEO can close the item.
|
|
30
38
|
|
|
31
39
|
## Hard Rules
|
|
32
40
|
|
package/HR-Resource/cto/SKILL.md
CHANGED
|
@@ -28,13 +28,21 @@ Before engineering work, read `.harness/conventions/shared.md`, `.harness/conven
|
|
|
28
28
|
|
|
29
29
|
## Worker Activity Telemetry
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
When CEO routes this mission to you, set yourself as the live agent on entry so the dashboard shows the handoff: `bash scripts/harness-progress-set.sh . '.current_agent="cto" | .agent_status="running"'`.
|
|
32
|
+
|
|
33
|
+
Before launching any fresh worker session, update `.harness/progress.json` with `scripts/harness-progress-set.sh` so dashboards can show the worker as active. Record the worker name, owning CXX, report path, and `status:"running"` under `company_state.workers`, increment `company_state.active_workers`, and set `conductor.current_action` to `spawn:{worker-name}`. After the worker report is accepted, update that worker to `status:"complete"` and decrement `active_workers`. Do not leave `active_workers:0` while a worker session is running. Require every worker report to open with a `## Status` line whose body is `IN_PROGRESS` while the worker runs and `COMPLETE` once the report is final, so the dashboard shows true worker liveness instead of guessing from file timestamps.
|
|
34
|
+
|
|
35
|
+
On exit, after writing `cto.md` and handing back to CEO, run `bash scripts/harness-progress-set.sh . '.agent_status="completed"'` so the loop advances and the dashboard reflects the finished step. Do not clear `conductor.state`; only the CEO's Company Loop Termination step ends the loop.
|
|
36
|
+
|
|
37
|
+
## Operating Mode — Status Briefing & Agenda
|
|
38
|
+
|
|
39
|
+
When the active goal is operating (perpetual, `mission-state.json` lifecycle `operating`), CEO periodically orders a 현황 보고. In it, confirm — with worker-backed evidence — whether your hired workers' live deliverables still operate correctly toward the goal (for CTO: is the running system stable — errors, latency, uptime, resource limits?). If you discover a failure, drift, incident, opportunity, or risk, do not silently fix it or sit on it: raise it as an agenda item so CEO can adjudicate and route the next cycle: `bash scripts/harness-agenda.sh . <goal-rel> raise cto <kind> "<title>" "<evidence-path>"` (kinds: loss, drift, incident, opportunity, risk, verification-gap). When CEO routes a decided agenda item to you, implement it through hired workers, get CQO verification, and report so CEO can close the item.
|
|
32
40
|
|
|
33
41
|
## Browser Automation Briefing
|
|
34
42
|
|
|
35
43
|
Every CTO worker brief that may use Playwright, browser automation, browser-based inspection, E2E, or visual verification must explicitly include this requirement:
|
|
36
44
|
|
|
37
|
-
> Run Playwright/browser automation with a visible browser. Set `headless: false` in launch/config code, use headed test mode (`--headed`, `PWDEBUG=1`, or equivalent), prefer `channel: 'chrome'` when available, and do not use headless mode unless the Owner has explicitly approved an exception in this mission.
|
|
45
|
+
> Run Playwright/browser automation with a visible browser. Set `headless: false` in launch/config code, use headed test mode (`--headed`, `PWDEBUG=1`, or equivalent), prefer `channel: 'chrome'` when available, and do not use headless mode unless the Owner has explicitly approved an exception in this mission. Pace it middle-fast: `slowMo: 120` (ms) — observable but brisk. Do not use `slowMo: 300`+ (too slow); raise it only if the Owner explicitly asks to slow the demo down.
|
|
38
46
|
|
|
39
47
|
CTO must not accept worker plans or reports that omit this requirement when browser automation is in scope.
|
|
40
48
|
|
package/HR-Resource/ops/SKILL.md
CHANGED
|
@@ -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 or static HTML 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, static HTML, 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[]`.
|
|
@@ -82,13 +92,21 @@ After service launch, OPS continues the same monitoring duty against `runtime.pr
|
|
|
82
92
|
|
|
83
93
|
## Worker Activity Telemetry
|
|
84
94
|
|
|
85
|
-
|
|
95
|
+
When CEO routes this mission to you, set yourself as the live agent on entry so the dashboard shows the handoff: `bash scripts/harness-progress-set.sh . '.current_agent="ops" | .agent_status="running"'`.
|
|
96
|
+
|
|
97
|
+
Before launching any fresh worker session, update `.harness/progress.json` with `scripts/harness-progress-set.sh` so dashboards can show the worker as active. Record the worker name, owning CXX, report path, and `status:"running"` under `company_state.workers`, increment `company_state.active_workers`, and set `conductor.current_action` to `spawn:{worker-name}`. After the worker report is accepted, update that worker to `status:"complete"` and decrement `active_workers`. Do not leave `active_workers:0` while a worker session is running. Require every worker report to open with a `## Status` line whose body is `IN_PROGRESS` while the worker runs and `COMPLETE` once the report is final, so the dashboard shows true worker liveness instead of guessing from file timestamps.
|
|
98
|
+
|
|
99
|
+
On exit, after writing `ops.md` and handing back to CEO, run `bash scripts/harness-progress-set.sh . '.agent_status="completed"'` so the loop advances and the dashboard reflects the finished step. Do not clear `conductor.state`; only the CEO's Company Loop Termination step ends the loop.
|
|
100
|
+
|
|
101
|
+
## Operating Mode — Status Briefing & Agenda
|
|
102
|
+
|
|
103
|
+
When the active goal is operating (perpetual, `mission-state.json` lifecycle `operating`), OPS is the primary monitor of the never-ending loop. On every CEO 현황 보고, report — with monitoring evidence (logs, health, ports, metrics, P&L or domain KPIs) — whether the live system still operates correctly toward the goal. Any loss, drawdown, drift, incident, degraded health, or opportunity MUST become an agenda item so CEO can adjudicate and route the next research→apply→operate cycle: `bash scripts/harness-agenda.sh . <goal-rel> raise ops <kind> "<title>" "<evidence-path>"` (kinds: loss, drift, incident, opportunity, risk, verification-gap). OPS does not fix systems itself — it surfaces the agenda and supplies evidence; CTO owns the fix, COO owns new-strategy research, CQO owns verification. A clean monitoring round with nothing to raise is itself a valid briefing result.
|
|
86
104
|
|
|
87
105
|
## Browser Automation Briefing
|
|
88
106
|
|
|
89
107
|
Every OPS worker brief that may use Playwright, browser automation, browser-based monitoring, E2E, or visual/runtime verification must explicitly include this requirement:
|
|
90
108
|
|
|
91
|
-
> Run Playwright/browser automation with a visible browser. Set `headless: false` in launch/config code, use headed test mode (`--headed`, `PWDEBUG=1`, or equivalent), prefer `channel: 'chrome'` when available, and do not use headless mode unless the Owner has explicitly approved an exception in this mission.
|
|
109
|
+
> Run Playwright/browser automation with a visible browser. Set `headless: false` in launch/config code, use headed test mode (`--headed`, `PWDEBUG=1`, or equivalent), prefer `channel: 'chrome'` when available, and do not use headless mode unless the Owner has explicitly approved an exception in this mission. Pace it middle-fast: `slowMo: 120` (ms) — observable but brisk. Do not use `slowMo: 300`+ (too slow); raise it only if the Owner explicitly asks to slow the demo down.
|
|
92
110
|
|
|
93
111
|
OPS must not accept worker plans or reports that omit this requirement when browser automation is in scope.
|
|
94
112
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness-ops-prompt-inspector
|
|
3
|
+
description: "OPS-only dev-mode visual API binding for React/Next.js or static HTML 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 or static HTML 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 or static `index.html`)
|
|
33
|
+
2. Copies component to `components/PromptInspector.tsx`, or static script to `public/prompt-inspector-static.js`
|
|
34
|
+
3. Injects into root layout or `index.html` (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. For React/Next.js, 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
|
+
3. For static HTML, copy `assets/prompt-inspector-static.js` to `public/` and add before `</body>`:
|
|
99
|
+
```html
|
|
100
|
+
<script src="/public/prompt-inspector-static.js" data-harness-ops-prompt-inspector></script>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Handler Templates
|
|
104
|
+
|
|
105
|
+
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
|
+
}
|