arkaos 4.24.0 → 4.26.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 (41) 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/bin/arka +8 -0
  6. package/config/claude-agents/dba.md +3 -3
  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/agents/dba.yaml +1 -1
  10. package/departments/dev/skills/build-fix/SKILL.md +122 -0
  11. package/departments/dev/skills/opensource-release/SKILL.md +96 -0
  12. package/departments/dev/skills/react-review/SKILL.md +86 -0
  13. package/departments/ops/skills/harness-tune/SKILL.md +79 -0
  14. package/departments/ops/skills/hookify/SKILL.md +89 -0
  15. package/departments/ops/skills/session-retro/SKILL.md +81 -0
  16. package/departments/ops/skills/workspace-audit/SKILL.md +88 -0
  17. package/departments/pm/skills/epic-coordination/SKILL.md +79 -0
  18. package/harness/codex/AGENTS.md +139 -0
  19. package/harness/copilot/copilot-instructions.md +139 -0
  20. package/harness/cursor/rules/arkaos-stack-laravel.mdc +16 -0
  21. package/harness/cursor/rules/arkaos-stack-node.mdc +14 -0
  22. package/harness/cursor/rules/arkaos-stack-nuxt.mdc +15 -0
  23. package/harness/cursor/rules/arkaos-stack-php.mdc +14 -0
  24. package/harness/cursor/rules/arkaos-stack-python.mdc +14 -0
  25. package/harness/cursor/rules/arkaos-stack-react.mdc +14 -0
  26. package/harness/cursor/rules/arkaos-stack-vue.mdc +14 -0
  27. package/harness/cursor/rules/arkaos.mdc +72 -0
  28. package/harness/gemini/GEMINI.md +139 -0
  29. package/harness/opencode/AGENTS.md +139 -0
  30. package/harness/zed/.rules +139 -0
  31. package/installer/adapters/codex-cli.js +16 -27
  32. package/installer/adapters/cursor.js +22 -26
  33. package/installer/adapters/gemini-cli.js +15 -30
  34. package/installer/cli.js +1 -1
  35. package/installer/doctor.js +225 -0
  36. package/installer/harness-bundle.js +39 -0
  37. package/knowledge/agents-registry-v2.json +3 -3
  38. package/knowledge/skills-manifest.json +105 -1
  39. package/package.json +2 -1
  40. package/pyproject.toml +1 -1
  41. package/scripts/harness_gen.py +287 -0
@@ -48,6 +48,107 @@ 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: the PostToolUse hook writes it
91
+ // (core/hooks/post_tool_use.py::_store_gotcha) and `/arka evolve`
92
+ // (#348) ingests it. Missing means capture never ran; corrupt means
93
+ // evolve will choke.
94
+ export function gotchasHealthy(
95
+ gotchasPath = join(INSTALL_DIR, "gotchas.json")
96
+ ) {
97
+ if (!existsSync(gotchasPath)) return false;
98
+ try {
99
+ return Array.isArray(JSON.parse(readFileSync(gotchasPath, "utf-8")));
100
+ } catch {
101
+ return false;
102
+ }
103
+ }
104
+
105
+ // The MCP registry ships inside the read-only arka skill bundle.
106
+ export function mcpRegistryHealthy(
107
+ registryPath = join(
108
+ homedir(), ".claude", "skills", "arka", "mcps", "registry.json")
109
+ ) {
110
+ if (!existsSync(registryPath)) return false;
111
+ try {
112
+ const reg = JSON.parse(readFileSync(registryPath, "utf-8"));
113
+ return !!reg.mcpServers;
114
+ } catch {
115
+ return false;
116
+ }
117
+ }
118
+
119
+ // Floor for "an ArkaOS skill set is deployed at all" — curated mode
120
+ // ships 37 core skills, so 7 is a deliberately low absence detector,
121
+ // not a completeness gauge (skills-surface judges completeness).
122
+ export function deployedSkillCount(
123
+ skillsDir = join(homedir(), ".claude", "skills")
124
+ ) {
125
+ try {
126
+ return readdirSync(skillsDir).filter(
127
+ (dir) =>
128
+ dir.startsWith("arka-") &&
129
+ existsSync(join(skillsDir, dir, "SKILL.md"))
130
+ ).length;
131
+ } catch {
132
+ return 0;
133
+ }
134
+ }
135
+
136
+ // Recommended companion plugins (Superpowers + Claude-Mem). Probing
137
+ // spawns the claude CLI, so keep a hard timeout — a hung CLI must not
138
+ // stall the doctor (same rule as arka-tools-runner).
139
+ export function companionPluginsInstalled() {
140
+ if (!commandExists("claude")) return true; // no Claude Code — not applicable
141
+ try {
142
+ const out = execSync("claude plugin list", {
143
+ stdio: ["pipe", "pipe", "ignore"],
144
+ timeout: 15000,
145
+ }).toString();
146
+ return out.includes("superpowers") && out.includes("claude-mem");
147
+ } catch {
148
+ return false;
149
+ }
150
+ }
151
+
51
152
  export const checks = [
52
153
  {
53
154
  name: "install-dir",
@@ -405,6 +506,80 @@ export const checks = [
405
506
  },
406
507
  fix: () => "Run: npx arkaos keys set HIGGSFIELD_API_KEY <key> (https://higgsfield.ai) — needed for Higgsfield MCP generation",
407
508
  },
509
+ // ─── Claude-layer checks (issue #358) — migrated from the bash doctor.
510
+ // All warn-only: ArkaOS is multi-runtime, so absence of the Claude
511
+ // surface must never fail an install that targets codex/gemini/cursor.
512
+ {
513
+ name: "claude-cli",
514
+ description: "Claude Code CLI installed",
515
+ severity: "warn",
516
+ check: () => commandExists("claude"),
517
+ fix: () => "Install: npm install -g @anthropic-ai/claude-code (or use another supported runtime)",
518
+ },
519
+ {
520
+ name: "arka-skill",
521
+ description: "arka orchestrator skill bundle deployed (~/.claude/skills/arka)",
522
+ severity: "warn",
523
+ check: () =>
524
+ existsSync(join(homedir(), ".claude", "skills", "arka", "SKILL.md")),
525
+ fix: () => "Run: npx arkaos install --force",
526
+ },
527
+ {
528
+ name: "jq",
529
+ description: "jq available (bash hooks parse JSON with it; python3 is the fallback)",
530
+ severity: "warn",
531
+ check: () => commandExists("jq"),
532
+ fix: () => "Install jq: brew install jq (macOS) / apt install jq (Linux)",
533
+ },
534
+ {
535
+ name: "statusline",
536
+ description: "Status line configured and its command exists",
537
+ severity: "warn",
538
+ check: () => statuslineConfigured(),
539
+ fix: () => "Run: npx arkaos install --force (redeploys and wires the statusline)",
540
+ },
541
+ {
542
+ name: "hooks-wired",
543
+ description: "Hook chain referenced by ~/.claude/settings.json (governance live)",
544
+ severity: "warn",
545
+ check: () => hooksWired(),
546
+ fix: () => "Run: npx arkaos install --force (rewires hooks into settings.json)",
547
+ },
548
+ {
549
+ name: "skills-deployed",
550
+ description: "ArkaOS skill set deployed (>= 7 arka-* skills)",
551
+ severity: "warn",
552
+ check: () => deployedSkillCount() >= 7,
553
+ fix: () => "Run: npx arkaos@latest update (redeploys the curated skill set)",
554
+ },
555
+ {
556
+ name: "mcp-registry",
557
+ description: "MCP registry present in the arka skill bundle",
558
+ severity: "warn",
559
+ check: () => mcpRegistryHealthy(),
560
+ fix: () => "Run: npx arkaos install --force",
561
+ },
562
+ {
563
+ name: "yt-dlp",
564
+ description: "yt-dlp present (video reference analysis + content ingestion)",
565
+ severity: "warn",
566
+ check: () => commandExists("yt-dlp"),
567
+ fix: () => "Install yt-dlp: brew install yt-dlp (macOS) / pipx install yt-dlp — only needed for video/content workflows",
568
+ },
569
+ {
570
+ name: "gotchas",
571
+ description: "gotchas.json valid (capture layer output, ingested by /arka evolve)",
572
+ severity: "warn",
573
+ check: () => gotchasHealthy(),
574
+ fix: () => "Missing: capture has not run yet (created automatically). Corrupt: inspect ~/.arkaos/gotchas.json — /arka evolve cannot ingest it",
575
+ },
576
+ {
577
+ name: "companion-plugins",
578
+ description: "Companion plugins installed (Superpowers + Claude-Mem)",
579
+ severity: "warn",
580
+ check: () => companionPluginsInstalled(),
581
+ 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",
582
+ },
408
583
  ];
409
584
 
410
585
  // ─── Windows-only checks ───────────────────────────────────────────────
@@ -464,6 +639,8 @@ if (IS_WINDOWS) {
464
639
 
465
640
  export async function doctor(options = {}) {
466
641
  const fixMode = !!options.fix;
642
+ const jsonMode = !!options.json;
643
+ if (jsonMode) return doctorJson();
467
644
  console.log(`\n ArkaOS Doctor — Health Checks${fixMode ? " (--fix)" : ""}\n`);
468
645
 
469
646
  // ─── --fix: repair the venv before reporting checks (PR2 v3.73.1) ────
@@ -535,6 +712,54 @@ export async function doctor(options = {}) {
535
712
  if (failed > 0) process.exit(1);
536
713
  }
537
714
 
715
+ // Machine-readable run (issue #358 step 4). Same checks, same exit-code
716
+ // contract as the human run; the security advisory stays out — it is a
717
+ // human-facing print, and the scanner already has its own --json
718
+ // (core.governance.harness_scanner_cli).
719
+ function doctorJson() {
720
+ const results = [];
721
+ let passed = 0;
722
+ let warned = 0;
723
+ let failed = 0;
724
+ for (const check of checks) {
725
+ let ok = false;
726
+ let error = null;
727
+ try {
728
+ ok = !!check.check();
729
+ } catch (err) {
730
+ error = err && err.message
731
+ ? String(err.message).split("\n")[0].slice(0, 120)
732
+ : String(err);
733
+ }
734
+ const status = ok ? "pass" : check.severity === "fail" ? "fail" : "warn";
735
+ if (ok) passed++;
736
+ else if (check.severity === "fail") failed++;
737
+ else warned++;
738
+ const entry = {
739
+ name: check.name,
740
+ status,
741
+ severity: check.severity,
742
+ description: check.description,
743
+ fix: ok ? "" : safeFix(check),
744
+ };
745
+ if (error) entry.error = error;
746
+ results.push(entry);
747
+ }
748
+ console.log(JSON.stringify({
749
+ checks: results,
750
+ summary: { passed, warned, failed, total: results.length },
751
+ }));
752
+ if (failed > 0) process.exit(1);
753
+ }
754
+
755
+ function safeFix(check) {
756
+ try {
757
+ return check.fix();
758
+ } catch {
759
+ return "(fix hint unavailable)";
760
+ }
761
+ }
762
+
538
763
  // Doctor answers "is the install healthy?". It never answered "is the
539
764
  // install SAFE?" — a config can be perfectly healthy and still hand a
540
765
  // third party the right to run code on this machine. The scanner does
@@ -0,0 +1,39 @@
1
+ import { existsSync, readFileSync, readdirSync } from "node:fs";
2
+ import { join, dirname, resolve, sep } 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
+ // Containment guard: a rel that escapes the target's bundle directory
20
+ // resolves to null — defense-in-depth, unreachable from today's
21
+ // hardcoded callers.
22
+ export function readBundleFile(target, rel) {
23
+ const base = resolve(bundleDir(target));
24
+ const path = resolve(base, rel);
25
+ if (path !== base && !path.startsWith(base + sep)) return null;
26
+ return existsSync(path) ? readFileSync(path, "utf-8") : null;
27
+ }
28
+
29
+ // Flat file listing of a bundle subdirectory (e.g. cursor "rules").
30
+ export function listBundleFiles(target, subdir = "") {
31
+ const base = join(bundleDir(target), subdir);
32
+ try {
33
+ return readdirSync(base).filter((name) =>
34
+ existsSync(join(base, name)) && !name.startsWith(".")
35
+ );
36
+ } catch {
37
+ return [];
38
+ }
39
+ }
@@ -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-21T11:11:29.016401",
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",
@@ -1586,7 +1586,7 @@
1586
1586
  {
1587
1587
  "id": "dba-data-eng",
1588
1588
  "name": "Vasco",
1589
- "role": "Data Platform Lead (Database & Data Engineer)",
1589
+ "role": "Data Platform Lead Database & Data Engineer",
1590
1590
  "department": "dev",
1591
1591
  "tier": 2,
1592
1592
  "model": "sonnet",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "_meta": {
3
3
  "generator": "scripts/marketplace_gen.py",
4
- "version": "4.24.0",
4
+ "version": "4.26.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"
@@ -1347,6 +1373,19 @@
1347
1373
  "origin": "arkaos"
1348
1374
  }
1349
1375
  },
1376
+ "harness-tune": {
1377
+ "depts": [
1378
+ "ops"
1379
+ ],
1380
+ "curated": false,
1381
+ "plugins": [
1382
+ "arkaos-ops@arkaos"
1383
+ ],
1384
+ "collision": false,
1385
+ "provenance": {
1386
+ "origin": "arkaos"
1387
+ }
1388
+ },
1350
1389
  "headline-write": {
1351
1390
  "depts": [
1352
1391
  "landing"
@@ -1386,6 +1425,19 @@
1386
1425
  "origin": "arkaos"
1387
1426
  }
1388
1427
  },
1428
+ "hookify": {
1429
+ "depts": [
1430
+ "ops"
1431
+ ],
1432
+ "curated": false,
1433
+ "plugins": [
1434
+ "arkaos-ops@arkaos"
1435
+ ],
1436
+ "collision": false,
1437
+ "provenance": {
1438
+ "origin": "arkaos"
1439
+ }
1440
+ },
1389
1441
  "identity-system": {
1390
1442
  "depts": [
1391
1443
  "brand"
@@ -2015,6 +2067,19 @@
2015
2067
  "origin": "arkaos"
2016
2068
  }
2017
2069
  },
2070
+ "opensource-release": {
2071
+ "depts": [
2072
+ "dev"
2073
+ ],
2074
+ "curated": false,
2075
+ "plugins": [
2076
+ "arkaos-dev@arkaos"
2077
+ ],
2078
+ "collision": false,
2079
+ "provenance": {
2080
+ "origin": "arkaos"
2081
+ }
2082
+ },
2018
2083
  "operations": {
2019
2084
  "depts": [
2020
2085
  "ops"
@@ -2390,6 +2455,19 @@
2390
2455
  "origin": "arkaos"
2391
2456
  }
2392
2457
  },
2458
+ "react-review": {
2459
+ "depts": [
2460
+ "dev"
2461
+ ],
2462
+ "curated": false,
2463
+ "plugins": [
2464
+ "arkaos-dev@arkaos"
2465
+ ],
2466
+ "collision": false,
2467
+ "provenance": {
2468
+ "origin": "arkaos"
2469
+ }
2470
+ },
2393
2471
  "red-team": {
2394
2472
  "depts": [
2395
2473
  "dev"
@@ -2690,6 +2768,19 @@
2690
2768
  "origin": "arkaos"
2691
2769
  }
2692
2770
  },
2771
+ "session-retro": {
2772
+ "depts": [
2773
+ "ops"
2774
+ ],
2775
+ "curated": false,
2776
+ "plugins": [
2777
+ "arkaos-ops@arkaos"
2778
+ ],
2779
+ "collision": false,
2780
+ "provenance": {
2781
+ "origin": "arkaos"
2782
+ }
2783
+ },
2693
2784
  "shape-pitch": {
2694
2785
  "depts": [
2695
2786
  "pm"
@@ -3248,6 +3339,19 @@
3248
3339
  "origin": "arkaos"
3249
3340
  }
3250
3341
  },
3342
+ "workspace-audit": {
3343
+ "depts": [
3344
+ "ops"
3345
+ ],
3346
+ "curated": false,
3347
+ "plugins": [
3348
+ "arkaos-ops@arkaos"
3349
+ ],
3350
+ "collision": false,
3351
+ "provenance": {
3352
+ "origin": "arkaos"
3353
+ }
3354
+ },
3251
3355
  "write-as-persona": {
3252
3356
  "depts": [
3253
3357
  "kb"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "4.24.0",
3
+ "version": "4.26.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.24.0"
3
+ version = "4.26.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"}