arkaos 4.23.0 → 4.25.0

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 (38) hide show
  1. package/README.md +1 -1
  2. package/THE-ARKAOS-GUIDE.md +1 -1
  3. package/VERSION +1 -1
  4. package/arka/SKILL.md +1 -1
  5. package/arka/skills/conclave/SKILL.md +11 -0
  6. package/bin/arka +8 -0
  7. package/config/claude-agents/shadcn-padronizer.md +3 -3
  8. package/departments/brand/agents/design-ops/shadcn-padronizer.yaml +1 -1
  9. package/departments/dev/skills/build-fix/SKILL.md +122 -0
  10. package/departments/dev/skills/evaluator-build-loop/SKILL.md +93 -0
  11. package/departments/dev/skills/react-review/SKILL.md +86 -0
  12. package/departments/dev/skills/spec-miner/SKILL.md +86 -0
  13. package/departments/ops/skills/hookify/SKILL.md +89 -0
  14. package/departments/pm/skills/epic-coordination/SKILL.md +79 -0
  15. package/harness/codex/AGENTS.md +139 -0
  16. package/harness/copilot/copilot-instructions.md +139 -0
  17. package/harness/cursor/rules/arkaos-stack-laravel.mdc +16 -0
  18. package/harness/cursor/rules/arkaos-stack-node.mdc +14 -0
  19. package/harness/cursor/rules/arkaos-stack-nuxt.mdc +15 -0
  20. package/harness/cursor/rules/arkaos-stack-php.mdc +14 -0
  21. package/harness/cursor/rules/arkaos-stack-python.mdc +14 -0
  22. package/harness/cursor/rules/arkaos-stack-react.mdc +14 -0
  23. package/harness/cursor/rules/arkaos-stack-vue.mdc +14 -0
  24. package/harness/cursor/rules/arkaos.mdc +72 -0
  25. package/harness/gemini/GEMINI.md +139 -0
  26. package/harness/opencode/AGENTS.md +139 -0
  27. package/harness/zed/.rules +139 -0
  28. package/installer/adapters/codex-cli.js +16 -27
  29. package/installer/adapters/cursor.js +22 -26
  30. package/installer/adapters/gemini-cli.js +15 -30
  31. package/installer/cli.js +1 -1
  32. package/installer/doctor.js +224 -0
  33. package/installer/harness-bundle.js +34 -0
  34. package/knowledge/agents-registry-v2.json +2 -2
  35. package/knowledge/skills-manifest.json +79 -1
  36. package/package.json +2 -1
  37. package/pyproject.toml +1 -1
  38. package/scripts/harness_gen.py +274 -0
@@ -48,6 +48,106 @@ export function corruptDbBackups(baseDir = INSTALL_DIR) {
48
48
  }
49
49
  }
50
50
 
51
+ // ─── Claude-layer probes (issue #358 migration) ─────────────────────────
52
+ // Migrated from the retired bash doctor's Claude-skills layer. Paths are
53
+ // injectable for tests. Three bash checks were deliberately NOT migrated
54
+ // because they audit v1-only artifacts with no v2 counterpart:
55
+ // personas — v2 deploys agents per-project via the sync engine
56
+ // agent-memory — superseded by the claude-mem plugin
57
+ // capabilities — v1 KB artifact (~/.arka-os/capabilities.json)
58
+
59
+ // The hook FILES living in ~/.arkaos/config/hooks (the hooks-dir check)
60
+ // prove nothing about whether Claude Code RUNS them. Governance is only
61
+ // live when ~/.claude/settings.json references the chain — a machine can
62
+ // have every script present, nothing wired, and a green doctor.
63
+ export function hooksWired(
64
+ settingsPath = join(homedir(), ".claude", "settings.json")
65
+ ) {
66
+ if (!existsSync(settingsPath)) return true; // no Claude Code — not applicable
67
+ try {
68
+ const settings = JSON.parse(readFileSync(settingsPath, "utf-8"));
69
+ return !!(settings.hooks && settings.hooks.UserPromptSubmit);
70
+ } catch {
71
+ return false; // unreadable settings = unverifiable wiring, surface it
72
+ }
73
+ }
74
+
75
+ // Status line: configured AND the command it points at exists on disk.
76
+ export function statuslineConfigured(
77
+ settingsPath = join(homedir(), ".claude", "settings.json")
78
+ ) {
79
+ if (!existsSync(settingsPath)) return true; // no Claude Code — not applicable
80
+ try {
81
+ const settings = JSON.parse(readFileSync(settingsPath, "utf-8"));
82
+ const cmd = settings.statusLine && settings.statusLine.command;
83
+ if (!cmd) return false;
84
+ return existsSync(cmd);
85
+ } catch {
86
+ return false;
87
+ }
88
+ }
89
+
90
+ // gotchas.json is live v2 state: capture/collector.py appends to it and
91
+ // `/arka evolve` (#348) ingests it. Missing means capture never ran;
92
+ // corrupt means evolve will choke.
93
+ export function gotchasHealthy(
94
+ gotchasPath = join(INSTALL_DIR, "gotchas.json")
95
+ ) {
96
+ if (!existsSync(gotchasPath)) return false;
97
+ try {
98
+ return Array.isArray(JSON.parse(readFileSync(gotchasPath, "utf-8")));
99
+ } catch {
100
+ return false;
101
+ }
102
+ }
103
+
104
+ // The MCP registry ships inside the read-only arka skill bundle.
105
+ export function mcpRegistryHealthy(
106
+ registryPath = join(
107
+ homedir(), ".claude", "skills", "arka", "mcps", "registry.json")
108
+ ) {
109
+ if (!existsSync(registryPath)) return false;
110
+ try {
111
+ const reg = JSON.parse(readFileSync(registryPath, "utf-8"));
112
+ return !!reg.mcpServers;
113
+ } catch {
114
+ return false;
115
+ }
116
+ }
117
+
118
+ // Floor for "an ArkaOS skill set is deployed at all" — curated mode
119
+ // ships 37 core skills, so 7 is a deliberately low absence detector,
120
+ // not a completeness gauge (skills-surface judges completeness).
121
+ export function deployedSkillCount(
122
+ skillsDir = join(homedir(), ".claude", "skills")
123
+ ) {
124
+ try {
125
+ return readdirSync(skillsDir).filter(
126
+ (dir) =>
127
+ dir.startsWith("arka-") &&
128
+ existsSync(join(skillsDir, dir, "SKILL.md"))
129
+ ).length;
130
+ } catch {
131
+ return 0;
132
+ }
133
+ }
134
+
135
+ // Recommended companion plugins (Superpowers + Claude-Mem). Probing
136
+ // spawns the claude CLI, so keep a hard timeout — a hung CLI must not
137
+ // stall the doctor (same rule as arka-tools-runner).
138
+ export function companionPluginsInstalled() {
139
+ if (!commandExists("claude")) return true; // no Claude Code — not applicable
140
+ try {
141
+ const out = execSync("claude plugin list", {
142
+ stdio: ["pipe", "pipe", "ignore"],
143
+ timeout: 15000,
144
+ }).toString();
145
+ return out.includes("superpowers") && out.includes("claude-mem");
146
+ } catch {
147
+ return false;
148
+ }
149
+ }
150
+
51
151
  export const checks = [
52
152
  {
53
153
  name: "install-dir",
@@ -405,6 +505,80 @@ export const checks = [
405
505
  },
406
506
  fix: () => "Run: npx arkaos keys set HIGGSFIELD_API_KEY <key> (https://higgsfield.ai) — needed for Higgsfield MCP generation",
407
507
  },
508
+ // ─── Claude-layer checks (issue #358) — migrated from the bash doctor.
509
+ // All warn-only: ArkaOS is multi-runtime, so absence of the Claude
510
+ // surface must never fail an install that targets codex/gemini/cursor.
511
+ {
512
+ name: "claude-cli",
513
+ description: "Claude Code CLI installed",
514
+ severity: "warn",
515
+ check: () => commandExists("claude"),
516
+ fix: () => "Install: npm install -g @anthropic-ai/claude-code (or use another supported runtime)",
517
+ },
518
+ {
519
+ name: "arka-skill",
520
+ description: "arka orchestrator skill bundle deployed (~/.claude/skills/arka)",
521
+ severity: "warn",
522
+ check: () =>
523
+ existsSync(join(homedir(), ".claude", "skills", "arka", "SKILL.md")),
524
+ fix: () => "Run: npx arkaos install --force",
525
+ },
526
+ {
527
+ name: "jq",
528
+ description: "jq available (bash hooks parse JSON with it; python3 is the fallback)",
529
+ severity: "warn",
530
+ check: () => commandExists("jq"),
531
+ fix: () => "Install jq: brew install jq (macOS) / apt install jq (Linux)",
532
+ },
533
+ {
534
+ name: "statusline",
535
+ description: "Status line configured and its command exists",
536
+ severity: "warn",
537
+ check: () => statuslineConfigured(),
538
+ fix: () => "Run: npx arkaos install --force (redeploys and wires the statusline)",
539
+ },
540
+ {
541
+ name: "hooks-wired",
542
+ description: "Hook chain referenced by ~/.claude/settings.json (governance live)",
543
+ severity: "warn",
544
+ check: () => hooksWired(),
545
+ fix: () => "Run: npx arkaos install --force (rewires hooks into settings.json)",
546
+ },
547
+ {
548
+ name: "skills-deployed",
549
+ description: "ArkaOS skill set deployed (>= 7 arka-* skills)",
550
+ severity: "warn",
551
+ check: () => deployedSkillCount() >= 7,
552
+ fix: () => "Run: npx arkaos@latest update (redeploys the curated skill set)",
553
+ },
554
+ {
555
+ name: "mcp-registry",
556
+ description: "MCP registry present in the arka skill bundle",
557
+ severity: "warn",
558
+ check: () => mcpRegistryHealthy(),
559
+ fix: () => "Run: npx arkaos install --force",
560
+ },
561
+ {
562
+ name: "yt-dlp",
563
+ description: "yt-dlp present (video reference analysis + content ingestion)",
564
+ severity: "warn",
565
+ check: () => commandExists("yt-dlp"),
566
+ fix: () => "Install yt-dlp: brew install yt-dlp (macOS) / pipx install yt-dlp — only needed for video/content workflows",
567
+ },
568
+ {
569
+ name: "gotchas",
570
+ description: "gotchas.json valid (capture layer output, ingested by /arka evolve)",
571
+ severity: "warn",
572
+ check: () => gotchasHealthy(),
573
+ fix: () => "Missing: capture has not run yet (created automatically). Corrupt: inspect ~/.arkaos/gotchas.json — /arka evolve cannot ingest it",
574
+ },
575
+ {
576
+ name: "companion-plugins",
577
+ description: "Companion plugins installed (Superpowers + Claude-Mem)",
578
+ severity: "warn",
579
+ check: () => companionPluginsInstalled(),
580
+ fix: () => "claude plugin marketplace add obra/superpowers-marketplace && claude plugin install superpowers@superpowers-marketplace; claude plugin marketplace add thedotmack/claude-mem && claude plugin install claude-mem@thedotmack",
581
+ },
408
582
  ];
409
583
 
410
584
  // ─── Windows-only checks ───────────────────────────────────────────────
@@ -464,6 +638,8 @@ if (IS_WINDOWS) {
464
638
 
465
639
  export async function doctor(options = {}) {
466
640
  const fixMode = !!options.fix;
641
+ const jsonMode = !!options.json;
642
+ if (jsonMode) return doctorJson();
467
643
  console.log(`\n ArkaOS Doctor — Health Checks${fixMode ? " (--fix)" : ""}\n`);
468
644
 
469
645
  // ─── --fix: repair the venv before reporting checks (PR2 v3.73.1) ────
@@ -535,6 +711,54 @@ export async function doctor(options = {}) {
535
711
  if (failed > 0) process.exit(1);
536
712
  }
537
713
 
714
+ // Machine-readable run (issue #358 step 4). Same checks, same exit-code
715
+ // contract as the human run; the security advisory stays out — it is a
716
+ // human-facing print, and the scanner already has its own --json
717
+ // (core.governance.harness_scanner_cli).
718
+ function doctorJson() {
719
+ const results = [];
720
+ let passed = 0;
721
+ let warned = 0;
722
+ let failed = 0;
723
+ for (const check of checks) {
724
+ let ok = false;
725
+ let error = null;
726
+ try {
727
+ ok = !!check.check();
728
+ } catch (err) {
729
+ error = err && err.message
730
+ ? String(err.message).split("\n")[0].slice(0, 120)
731
+ : String(err);
732
+ }
733
+ const status = ok ? "pass" : check.severity === "fail" ? "fail" : "warn";
734
+ if (ok) passed++;
735
+ else if (check.severity === "fail") failed++;
736
+ else warned++;
737
+ const entry = {
738
+ name: check.name,
739
+ status,
740
+ severity: check.severity,
741
+ description: check.description,
742
+ fix: ok ? "" : safeFix(check),
743
+ };
744
+ if (error) entry.error = error;
745
+ results.push(entry);
746
+ }
747
+ console.log(JSON.stringify({
748
+ checks: results,
749
+ summary: { passed, warned, failed, total: results.length },
750
+ }));
751
+ if (failed > 0) process.exit(1);
752
+ }
753
+
754
+ function safeFix(check) {
755
+ try {
756
+ return check.fix();
757
+ } catch {
758
+ return "(fix hint unavailable)";
759
+ }
760
+ }
761
+
538
762
  // Doctor answers "is the install healthy?". It never answered "is the
539
763
  // install SAFE?" — a config can be perfectly healthy and still hand a
540
764
  // third party the right to run code on this machine. The scanner does
@@ -0,0 +1,34 @@
1
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
2
+ import { join, dirname } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ // Multi-runtime instruction bundles, generated by scripts/harness_gen.py
6
+ // and shipped inside the npm package under harness/<target>/. The
7
+ // adapters deploy these VERBATIM — before this module existed they wrote
8
+ // pointers at ~/.arkaos/config/<runtime>-instructions.md, a file nothing
9
+ // ever created (issue found during the harness-generator work).
10
+ const PKG_ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");
11
+
12
+ export function bundleDir(target) {
13
+ return join(PKG_ROOT, "harness", target);
14
+ }
15
+
16
+ // Content of one bundle file, or null when the bundle is absent (a
17
+ // source tree without a generated harness/ — callers must fall back
18
+ // loudly, never write a pointer to a file that does not exist).
19
+ export function readBundleFile(target, rel) {
20
+ const path = join(bundleDir(target), rel);
21
+ return existsSync(path) ? readFileSync(path, "utf-8") : null;
22
+ }
23
+
24
+ // Flat file listing of a bundle subdirectory (e.g. cursor "rules").
25
+ export function listBundleFiles(target, subdir = "") {
26
+ const base = join(bundleDir(target), subdir);
27
+ try {
28
+ return readdirSync(base).filter((name) =>
29
+ existsSync(join(base, name)) && !name.startsWith(".")
30
+ );
31
+ } catch {
32
+ return [];
33
+ }
34
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_meta": {
3
3
  "version": "2.0.0",
4
- "generated": "2026-07-14T23:46:28.709940",
4
+ "generated": "2026-07-20T21:08:57.022558",
5
5
  "total_agents": 86,
6
6
  "generator": "core/agents/registry_gen.py",
7
7
  "tiers": {
@@ -251,7 +251,7 @@
251
251
  {
252
252
  "id": "shadcn-padronizer-leo",
253
253
  "name": "Leo",
254
- "role": "Component Library Padronizer",
254
+ "role": "Component Library Standardizer",
255
255
  "department": "brand",
256
256
  "tier": 2,
257
257
  "model": "sonnet",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_meta": {
3
3
  "generator": "scripts/marketplace_gen.py",
4
- "version": "4.23.0",
4
+ "version": "4.25.0",
5
5
  "marketplace": "arkaos"
6
6
  },
7
7
  "structural": {
@@ -420,6 +420,19 @@
420
420
  "origin": "arkaos"
421
421
  }
422
422
  },
423
+ "build-fix": {
424
+ "depts": [
425
+ "dev"
426
+ ],
427
+ "curated": false,
428
+ "plugins": [
429
+ "arkaos-dev@arkaos"
430
+ ],
431
+ "collision": false,
432
+ "provenance": {
433
+ "origin": "arkaos"
434
+ }
435
+ },
423
436
  "business-model": {
424
437
  "depts": [
425
438
  "community"
@@ -1095,6 +1108,19 @@
1095
1108
  "origin": "arkaos"
1096
1109
  }
1097
1110
  },
1111
+ "epic-coordination": {
1112
+ "depts": [
1113
+ "pm"
1114
+ ],
1115
+ "curated": false,
1116
+ "plugins": [
1117
+ "arkaos-pm@arkaos"
1118
+ ],
1119
+ "collision": false,
1120
+ "provenance": {
1121
+ "origin": "arkaos"
1122
+ }
1123
+ },
1098
1124
  "estimate-forecast": {
1099
1125
  "depts": [
1100
1126
  "pm"
@@ -1108,6 +1134,19 @@
1108
1134
  "origin": "arkaos"
1109
1135
  }
1110
1136
  },
1137
+ "evaluator-build-loop": {
1138
+ "depts": [
1139
+ "dev"
1140
+ ],
1141
+ "curated": false,
1142
+ "plugins": [
1143
+ "arkaos-dev@arkaos"
1144
+ ],
1145
+ "collision": false,
1146
+ "provenance": {
1147
+ "origin": "arkaos"
1148
+ }
1149
+ },
1111
1150
  "events-plan": {
1112
1151
  "depts": [
1113
1152
  "community"
@@ -1373,6 +1412,19 @@
1373
1412
  "origin": "arkaos"
1374
1413
  }
1375
1414
  },
1415
+ "hookify": {
1416
+ "depts": [
1417
+ "ops"
1418
+ ],
1419
+ "curated": false,
1420
+ "plugins": [
1421
+ "arkaos-ops@arkaos"
1422
+ ],
1423
+ "collision": false,
1424
+ "provenance": {
1425
+ "origin": "arkaos"
1426
+ }
1427
+ },
1376
1428
  "identity-system": {
1377
1429
  "depts": [
1378
1430
  "brand"
@@ -2377,6 +2429,19 @@
2377
2429
  "origin": "arkaos"
2378
2430
  }
2379
2431
  },
2432
+ "react-review": {
2433
+ "depts": [
2434
+ "dev"
2435
+ ],
2436
+ "curated": false,
2437
+ "plugins": [
2438
+ "arkaos-dev@arkaos"
2439
+ ],
2440
+ "collision": false,
2441
+ "provenance": {
2442
+ "origin": "arkaos"
2443
+ }
2444
+ },
2380
2445
  "red-team": {
2381
2446
  "depts": [
2382
2447
  "dev"
@@ -2816,6 +2881,19 @@
2816
2881
  "origin": "arkaos"
2817
2882
  }
2818
2883
  },
2884
+ "spec-miner": {
2885
+ "depts": [
2886
+ "dev"
2887
+ ],
2888
+ "curated": false,
2889
+ "plugins": [
2890
+ "arkaos-dev@arkaos"
2891
+ ],
2892
+ "collision": false,
2893
+ "provenance": {
2894
+ "origin": "arkaos"
2895
+ }
2896
+ },
2819
2897
  "spin-sell": {
2820
2898
  "depts": [
2821
2899
  "sales"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "4.23.0",
3
+ "version": "4.25.0",
4
4
  "description": "The Operating System for AI Agent Teams",
5
5
  "type": "module",
6
6
  "bin": {
@@ -43,6 +43,7 @@
43
43
  "installer/",
44
44
  "core/",
45
45
  "departments/",
46
+ "harness/",
46
47
  "mcps/",
47
48
  "scripts/",
48
49
  "config/",
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "arkaos-core"
3
- version = "4.23.0"
3
+ version = "4.25.0"
4
4
  description = "Core engine for ArkaOS — The Operating System for AI Agent Teams"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}