@walwal-harness/cli 7.1.40 → 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.
Files changed (69) hide show
  1. package/HR-Resource/cdo/SKILL.md +9 -1
  2. package/HR-Resource/ceo/SKILL.md +33 -2
  3. package/HR-Resource/coo/SKILL.md +9 -1
  4. package/HR-Resource/cqo/SKILL.md +9 -1
  5. package/HR-Resource/cto/SKILL.md +10 -2
  6. package/HR-Resource/ops/SKILL.md +12 -4
  7. package/HR-Resource/ops-prompt-inspector/SKILL.md +11 -6
  8. package/HR-Resource/ops-prompt-inspector/assets/prompt-inspector-static.js +180 -0
  9. package/HR-Resource/ops-prompt-inspector/scripts/setup.py +66 -3
  10. package/apps/harness-dashboard/app/api/wake/route.ts +41 -0
  11. package/apps/harness-dashboard/components/Scene.tsx +568 -35
  12. package/apps/harness-dashboard/lib/__tests__/harness-state.test.ts +1 -202
  13. package/apps/harness-dashboard/lib/__tests__/sandbox-e2e.test.ts +490 -0
  14. package/apps/harness-dashboard/lib/harness-state.ts +107 -796
  15. package/apps/harness-dashboard/lib/types.ts +22 -222
  16. package/apps/harness-dashboard/playwright.config.ts +26 -7
  17. package/assets/templates/AGENTS-ko.md.template +1 -1
  18. package/assets/templates/AGENTS.md.template +12 -2
  19. package/assets/templates/HARNESS.md +2 -0
  20. package/assets/templates/company-pipeline-manifest.json +5 -14
  21. package/assets/templates/worker-report.md.template +38 -0
  22. package/bin/init.js +2 -1
  23. package/commands/goal.md +4 -2
  24. package/commands/hot-fix.md +1 -1
  25. package/commands/submission.md +1 -1
  26. package/package.json +1 -1
  27. package/scripts/conductor-tick.sh +12 -0
  28. package/scripts/harness-agenda.sh +105 -0
  29. package/scripts/harness-company-block.sh +89 -0
  30. package/scripts/harness-company-complete.sh +17 -8
  31. package/scripts/harness-company-cycle.sh +54 -0
  32. package/scripts/harness-progress-set.sh +8 -2
  33. package/scripts/harness-stop.sh +76 -0
  34. package/scripts/harness-wake-control.sh +151 -0
  35. package/scripts/harness-wake.sh +5 -0
  36. package/apps/harness-dashboard/components/Drawer.tsx +0 -146
  37. package/apps/harness-dashboard/components/Header.tsx +0 -40
  38. package/apps/harness-dashboard/components/MissionTimeline.tsx +0 -214
  39. package/apps/harness-dashboard/components/OrgTree.tsx +0 -459
  40. package/apps/harness-dashboard/components/drawer/AgentLogTab.tsx +0 -56
  41. package/apps/harness-dashboard/components/drawer/DesignPreviewTab.tsx +0 -160
  42. package/apps/harness-dashboard/components/drawer/GotchasTab.tsx +0 -89
  43. package/apps/harness-dashboard/components/drawer/HypothesisTab.tsx +0 -42
  44. package/apps/harness-dashboard/components/drawer/IncidentsTab.tsx +0 -50
  45. package/apps/harness-dashboard/components/drawer/MissionDocTab.tsx +0 -96
  46. package/apps/harness-dashboard/components/drawer/MissionFlowTab.tsx +0 -576
  47. package/apps/harness-dashboard/components/drawer/OwnerHistoryTab.tsx +0 -160
  48. package/apps/harness-dashboard/components/drawer/RoomMetricsTab.tsx +0 -90
  49. package/apps/harness-dashboard/components/drawer/TracksTab.tsx +0 -47
  50. package/apps/harness-dashboard/components/three/ArchiveBoxes.tsx +0 -95
  51. package/apps/harness-dashboard/components/three/DeptBoard.tsx +0 -175
  52. package/apps/harness-dashboard/components/three/Floor3D.tsx +0 -404
  53. package/apps/harness-dashboard/components/three/GoalCard3D.tsx +0 -123
  54. package/apps/harness-dashboard/components/three/HypothesisCards.tsx +0 -71
  55. package/apps/harness-dashboard/components/three/MeetingWhiteboard.tsx +0 -98
  56. package/apps/harness-dashboard/components/three/Minifig3D.tsx +0 -391
  57. package/apps/harness-dashboard/components/three/OpsSiren.tsx +0 -99
  58. package/apps/harness-dashboard/components/three/Stage3D.tsx +0 -104
  59. package/apps/harness-dashboard/components/three/TrackRibbons.tsx +0 -81
  60. package/apps/harness-dashboard/lib/__tests__/i18n.test.ts +0 -16
  61. package/apps/harness-dashboard/lib/__tests__/iso.test.ts +0 -42
  62. package/apps/harness-dashboard/lib/__tests__/state-mapping.test.ts +0 -183
  63. package/apps/harness-dashboard/lib/agent-roster.ts +0 -42
  64. package/apps/harness-dashboard/lib/furniture.ts +0 -165
  65. package/apps/harness-dashboard/lib/i18n.ts +0 -26
  66. package/apps/harness-dashboard/lib/iso.ts +0 -150
  67. package/apps/harness-dashboard/lib/markdown.tsx +0 -306
  68. package/apps/harness-dashboard/lib/path-planning.ts +0 -72
  69. package/apps/harness-dashboard/lib/state-mapping.ts +0 -146
@@ -3,7 +3,6 @@ import { mkdtempSync, mkdirSync, rmSync, utimesSync, writeFileSync } from "node:
3
3
  import { tmpdir } from "node:os";
4
4
  import path from "node:path";
5
5
  import { readHarnessState } from "../harness-state";
6
- import { AGENT_ROSTER } from "../agent-roster";
7
6
 
8
7
  describe("readHarnessState", () => {
9
8
  let dir: string;
@@ -16,54 +15,9 @@ describe("readHarnessState", () => {
16
15
  rmSync(dir, { recursive: true, force: true });
17
16
  });
18
17
 
19
- it("valid progress.json: derives typing for current_agent, talking for meetings.active, idle for the rest", () => {
20
- mkdirSync(path.join(dir, ".harness"), { recursive: true });
21
- writeFileSync(
22
- path.join(dir, ".harness", "progress.json"),
23
- JSON.stringify({
24
- sprint: { number: 1 },
25
- current_agent: "generator-backend",
26
- agent_status: "running",
27
- meetings: { active: ["planner"], cadence: "normal", next_scheduled: null },
28
- cto: { last_review: "2026-05-07", open_arch_risks: 0 },
29
- cqo: { last_audit: null, sprint_verdict: "pending", open_regressions: 0 },
30
- service_ops: { monitor: { last_check: "2026-05-07", alerts_this_sprint: 0 } },
31
- goals: {
32
- active_id: "g1",
33
- list: [{ id: "g1", title: "Brick Office MVP", description: "Phase C launch" }],
34
- current_adherence: 0.6,
35
- },
36
- })
37
- );
38
-
39
- const snap = readHarnessState(dir);
40
- expect(snap.errorBanner).toBeNull();
41
- expect(snap.agents.length).toBe(AGENT_ROSTER.length);
42
- expect(snap.agents.map((a) => a.id).sort()).toEqual(
43
- AGENT_ROSTER.map((a) => a.id).sort()
44
- );
45
- const stateOf = (id: string) => snap.agents.find((a) => a.id === id)!.minifigState;
46
- expect(stateOf("generator-backend")).toBe("typing");
47
- expect(stateOf("planner")).toBe("talking");
48
- expect(stateOf("dispatcher")).toBe("idle");
49
- expect(snap.rooms.length).toBe(7);
50
-
51
- const planner = snap.agents.find((a) => a.id === "planner")!;
52
- expect(planner.room).toBe("meeting");
53
- expect(planner.homeRoom).toBe("coo");
54
-
55
- const meetingRoom = snap.rooms.find((r) => r.id === "meeting")!;
56
- expect(meetingRoom.seatLayout).toBeDefined();
57
- expect(meetingRoom.seatLayout!.occupants).toContain("planner");
58
-
59
- expect(snap.goal).not.toBeNull();
60
- expect(snap.goal!.title).toBe("Brick Office MVP");
61
- });
62
-
63
18
  it("missing .harness: returns error banner, no crash", () => {
64
19
  const snap = readHarnessState(dir);
65
20
  expect(snap.errorBanner?.level).toBe("error");
66
- expect(snap.agents.length).toBe(AGENT_ROSTER.length);
67
21
  });
68
22
 
69
23
  it("corrupt progress.json: returns error banner, no crash", () => {
@@ -72,124 +26,6 @@ describe("readHarnessState", () => {
72
26
  const snap = readHarnessState(dir);
73
27
  expect(snap.errorBanner?.level).toBe("error");
74
28
  expect(snap.errorBanner?.message_en).toContain("corrupt");
75
- expect(snap.agents.length).toBe(AGENT_ROSTER.length);
76
- });
77
-
78
- it("v6 NEXUS: roster includes CTO, CQO, Brainstormer", () => {
79
- const ids = AGENT_ROSTER.map((a) => a.id);
80
- expect(ids).toContain("cto");
81
- expect(ids).toContain("cqo");
82
- expect(ids).toContain("brainstormer");
83
- });
84
-
85
- it("parallel tracks, hypothesis, escalations, incidents land in the snapshot", () => {
86
- mkdirSync(path.join(dir, ".harness"), { recursive: true });
87
- writeFileSync(
88
- path.join(dir, ".harness", "progress.json"),
89
- JSON.stringify({
90
- sprint: { number: 3 },
91
- pipeline: "FULLSTACK",
92
- current_agent: "conductor",
93
- agent_status: "running",
94
- meetings: {
95
- active: [],
96
- cadence: "heavy",
97
- next_scheduled: "2026-05-08T10:00Z",
98
- current: { type: "incident-war-room", topic: "P0 prod outage" },
99
- },
100
- cto: {
101
- last_review: "2026-05-07",
102
- open_arch_risks: 1,
103
- contract_signed: { be: true, fe: false },
104
- },
105
- cqo: {
106
- last_audit: "2026-05-07",
107
- sprint_verdict: "pending",
108
- open_regressions: 2,
109
- last_scores: {
110
- functional: 2.9,
111
- visual: 2.8,
112
- code_quality: 2.5,
113
- architecture: 2.95,
114
- security: 3.0,
115
- },
116
- },
117
- service_ops: {
118
- monitor: { last_check: "2026-05-07", alerts_this_sprint: 4 },
119
- incident: {
120
- open: [
121
- { id: "INC-1", dept: "CTO", severity: "critical", message: "DB down" },
122
- { id: "INC-2", dept: "Operations", severity: "medium" },
123
- ],
124
- },
125
- },
126
- parallel_tracks: [
127
- {
128
- id: "T-1",
129
- from_meeting: "spec-review",
130
- to_dept: "CTO",
131
- to_room: "cto-team",
132
- status: "in_progress",
133
- },
134
- {
135
- id: "T-2",
136
- from_meeting: "spec-review",
137
- to_dept: "Planner",
138
- to_room: "coo",
139
- status: "dispatched",
140
- },
141
- ],
142
- hypothesis: {
143
- active: [
144
- { id: "H-1", brief: "Cache hit > 80%", verdict: "pending" },
145
- { id: "H-2", brief: "p95 < 200ms", verdict: "valid" },
146
- ],
147
- },
148
- escalations: {
149
- open: [{ id: "E-1", reason: "three-fail", message: "regression x3" }],
150
- },
151
- contracts: {
152
- api: { version: "v2.1.0" },
153
- feature_list: { total: 16, passed: 12, failed: 1 },
154
- },
155
- })
156
- );
157
-
158
- const snap = readHarnessState(dir);
159
- expect(snap.errorBanner).toBeNull();
160
-
161
- expect(snap.tracks.map((t) => t.id)).toEqual(["T-1", "T-2"]);
162
- expect(snap.incidents.length).toBe(2);
163
- expect(snap.hypothesis.length).toBe(2);
164
- expect(snap.escalations.length).toBe(1);
165
- expect(snap.contract.pipeline).toBe("FULLSTACK");
166
- expect(snap.contract.sprint_number).toBe(3);
167
- expect(snap.contract.feature_total).toBe(16);
168
- expect(snap.contract.contract_signed).toEqual({ be: true, fe: false });
169
- expect(snap.evalScores?.code_quality).toBe(2.5);
170
- expect(snap.meetings.cadence).toBe("heavy");
171
- expect(snap.meetings.current?.type).toBe("incident-war-room");
172
-
173
- // CTO has an open incident → CTO-dept agents go red-alert; Service-Ops
174
- // is on-call and is *always* red when any incident is open.
175
- const stateOf = (id: string) => snap.agents.find((a) => a.id === id)!.minifigState;
176
- expect(stateOf("cto")).toBe("red-alert");
177
- expect(stateOf("service-ops")).toBe("red-alert");
178
- expect(stateOf("evaluator-visual")).toBe("idle"); // CQO dept untouched
179
- });
180
-
181
- it("buildArchive reads verdict.json when present", () => {
182
- const sprintDir = path.join(dir, ".harness", "archive", "sprint-1");
183
- mkdirSync(sprintDir, { recursive: true });
184
- writeFileSync(path.join(sprintDir, "verdict.json"), JSON.stringify({ result: "PASS" }));
185
- mkdirSync(path.join(dir, ".harness"), { recursive: true });
186
- writeFileSync(
187
- path.join(dir, ".harness", "progress.json"),
188
- JSON.stringify({ sprint: { number: 1 } })
189
- );
190
-
191
- const snap = readHarnessState(dir);
192
- expect(snap.archive.all.find((e) => e.dir === "sprint-1")?.result).toBe("PASS");
193
29
  });
194
30
 
195
31
  it("marks in-place goal document updates as submission only after the owner prompt", () => {
@@ -403,44 +239,11 @@ describe("readHarnessState", () => {
403
239
  const workers = readHarnessState(dir).missions[0].workers;
404
240
  expect(workers[0]).toMatchObject({
405
241
  name: "frontend-worker",
406
- status: "COMPLETE",
242
+ status: "unknown",
407
243
  active: false,
408
244
  });
409
245
  });
410
246
 
411
- it("reads manual worker telemetry with name, progress, eta, and report_path", () => {
412
- const harnessDir = path.join(dir, ".harness");
413
- mkdirSync(harnessDir, { recursive: true });
414
- writeFileSync(
415
- path.join(harnessDir, "progress.json"),
416
- JSON.stringify({
417
- agent_status: "running",
418
- company_state: {
419
- active_workers: 2,
420
- workers: [
421
- {
422
- name: "frontend-engineer-multi-strategy",
423
- status: "running",
424
- progress: "70%",
425
- eta: "2026-05-31 17:00",
426
- report_path: ".harness/documents/goal-1/cto/workers/frontend-engineer-multi-strategy.md",
427
- },
428
- ],
429
- },
430
- })
431
- );
432
-
433
- const worker = readHarnessState(dir).dashboard.workers[0];
434
- expect(worker).toMatchObject({
435
- agent: "frontend-engineer-multi-strategy",
436
- feature: "frontend-engineer-multi-strategy",
437
- status: "running",
438
- log: ".harness/documents/goal-1/cto/workers/frontend-engineer-multi-strategy.md",
439
- progress: 0.7,
440
- });
441
- expect(worker.summary).toContain("2026-05-31 17:00");
442
- });
443
-
444
247
  it("accepts keyed company_state.workers maps from manual CXX telemetry", () => {
445
248
  const harnessDir = path.join(dir, ".harness");
446
249
  const missionDir = path.join(harnessDir, "documents", "goal-1-dashboard");
@@ -468,10 +271,6 @@ describe("readHarnessState", () => {
468
271
  );
469
272
 
470
273
  const snap = readHarnessState(dir);
471
- expect(snap.dashboard.workers[0]).toMatchObject({
472
- agent: "engineering-engineering-code-reviewer",
473
- status: "running",
474
- });
475
274
  expect(snap.missions[0].workers[0]).toMatchObject({
476
275
  owner: "cqo",
477
276
  active: true,