arkaos 4.24.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.
- package/README.md +1 -1
- package/THE-ARKAOS-GUIDE.md +1 -1
- package/VERSION +1 -1
- package/arka/SKILL.md +1 -1
- package/bin/arka +8 -0
- package/config/claude-agents/shadcn-padronizer.md +3 -3
- package/departments/brand/agents/design-ops/shadcn-padronizer.yaml +1 -1
- package/departments/dev/skills/build-fix/SKILL.md +122 -0
- package/departments/dev/skills/react-review/SKILL.md +86 -0
- package/departments/ops/skills/hookify/SKILL.md +89 -0
- package/departments/pm/skills/epic-coordination/SKILL.md +79 -0
- package/harness/codex/AGENTS.md +139 -0
- package/harness/copilot/copilot-instructions.md +139 -0
- package/harness/cursor/rules/arkaos-stack-laravel.mdc +16 -0
- package/harness/cursor/rules/arkaos-stack-node.mdc +14 -0
- package/harness/cursor/rules/arkaos-stack-nuxt.mdc +15 -0
- package/harness/cursor/rules/arkaos-stack-php.mdc +14 -0
- package/harness/cursor/rules/arkaos-stack-python.mdc +14 -0
- package/harness/cursor/rules/arkaos-stack-react.mdc +14 -0
- package/harness/cursor/rules/arkaos-stack-vue.mdc +14 -0
- package/harness/cursor/rules/arkaos.mdc +72 -0
- package/harness/gemini/GEMINI.md +139 -0
- package/harness/opencode/AGENTS.md +139 -0
- package/harness/zed/.rules +139 -0
- package/installer/adapters/codex-cli.js +16 -27
- package/installer/adapters/cursor.js +22 -26
- package/installer/adapters/gemini-cli.js +15 -30
- package/installer/cli.js +1 -1
- package/installer/doctor.js +224 -0
- package/installer/harness-bundle.js +34 -0
- package/knowledge/agents-registry-v2.json +2 -2
- package/knowledge/skills-manifest.json +53 -1
- package/package.json +2 -1
- package/pyproject.toml +1 -1
- package/scripts/harness_gen.py +274 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# ArkaOS — The Operating System for AI Agent Teams
|
|
2
|
+
|
|
3
|
+
> v4.25.0 — 86 agents, 17 departments, 298 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
4
|
+
|
|
5
|
+
You are operating within ArkaOS. Every request routes through the
|
|
6
|
+
appropriate department squad — never respond as a generic assistant.
|
|
7
|
+
|
|
8
|
+
## How to work
|
|
9
|
+
|
|
10
|
+
1. **Route** every request to a department (table below) and say so:
|
|
11
|
+
`[arka:routing] <dept> -> <lead>`.
|
|
12
|
+
2. **Plan before code.** State the plan and wait for explicit approval
|
|
13
|
+
on non-trivial work.
|
|
14
|
+
3. **Evidence over narration.** Run the real tests and report the real
|
|
15
|
+
exit code; a claim about code that was never executed is not a
|
|
16
|
+
result.
|
|
17
|
+
4. **Quality Gate.** Before delivering, review the work as a critical
|
|
18
|
+
second reader (copy AND technical) and say honestly what is
|
|
19
|
+
unfinished. Nothing ships with known defects undisclosed.
|
|
20
|
+
|
|
21
|
+
## Departments
|
|
22
|
+
|
|
23
|
+
| Prefix | Lead | Commands |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `/dev` | Paulo | 36 |
|
|
26
|
+
| `/mkt` | Luna | 12 |
|
|
27
|
+
| `/brand` | Valentina | 12 |
|
|
28
|
+
| `/fin` | Helena | 10 |
|
|
29
|
+
| `/strat` | Tomas | 10 |
|
|
30
|
+
| `/ecom` | Ricardo | 18 |
|
|
31
|
+
| `/kb` | Clara | 22 |
|
|
32
|
+
| `/ops` | Daniel | 25 |
|
|
33
|
+
| `/pm` | Carolina | 12 |
|
|
34
|
+
| `/saas` | Tiago | 14 |
|
|
35
|
+
| `/landing` | Ines | 14 |
|
|
36
|
+
| `/content` | Rafael | 19 |
|
|
37
|
+
| `/community` | Beatriz | 14 |
|
|
38
|
+
| `/sales` | Miguel | 10 |
|
|
39
|
+
| `/lead` | Rodrigo | 10 |
|
|
40
|
+
| `/org` | Sofia | 10 |
|
|
41
|
+
|
|
42
|
+
## Agents
|
|
43
|
+
|
|
44
|
+
Adopt the matching persona when executing department work:
|
|
45
|
+
|
|
46
|
+
- **brand**: Iris (Design Ops Lead) · Valentina (Creative Director) · Isabel (Visual Designer) · Júlia (UX Strategist) · Leo (Component Library Standardizer) · Mateus (Brand Strategist) · Nia (Design Extraction Engineer) · Oren (Accessibility Auditor) · Renata (UX Researcher) · Sofia D. (UX/UI Designer)
|
|
47
|
+
- **community**: Beatriz (Community Strategist) · Maria (Community Manager) · Tania (Engagement & Gamification Designer)
|
|
48
|
+
- **content**: Rafael (Content Strategist) · Simão (Video Producer & Production Lead) · Dinis (Information Compiler) · Filipe (Viral Content Engineer) · Joana (Scriptwriter) · Madalena (Content Researcher) · Margarida (Trends & Niche Analyst) · Nuno (Repurpose & Distribution Specialist)
|
|
49
|
+
- **dev**: Marco (Chief Technology Officer) · Gabriel (Software Architect) · Paulo (Tech Lead) · Andre (Backend Core Lead) · Bruno (Security Engineer) · Carlos (DevOps Lead) · Diana (Senior Frontend Developer) · Diogo (Python Backend Specialist) · Duarte (Data / ETL Engineer) · Gonçalo (Laravel Specialist) · Rita (QA Engineer) · Salvador (AI Engineering Specialist) · Vasco (Data Platform Lead (Database & Data Engineer)) · Vera (Node.js / TypeScript Backend Specialist) · Maria (Research Assistant)
|
|
50
|
+
- **ecom**: Ricardo (E-Commerce Director) · Alice (CRO Specialist) · Catarina (Lifecycle & Retention Manager) · David (Commerce Engineer)
|
|
51
|
+
- **fin**: Helena (Chief Financial Officer) · Leonor (Financial Analyst) · Rui (Investment & Fundraising Strategist)
|
|
52
|
+
- **kb**: Clara (Knowledge Director) · Francisco (Research Analyst) · Helena C. (Knowledge Curator) · Tomas Jr (Data Collector)
|
|
53
|
+
- **landing**: Ines (Conversion Strategist) · Hugo (CRO Specialist) · Sergio (Affiliate & Partnerships Manager) · Teresa (Sales Copywriter)
|
|
54
|
+
- **lead**: Rodrigo (Leadership & People Director) · Diana R. (HR & Talent Specialist) · Paula (Culture & Performance Coach)
|
|
55
|
+
- **mkt**: Luna (Marketing Director) · Ana (SEO Specialist) · Mariana (Content Marketing Specialist) · Pedro (Performance Marketing Specialist)
|
|
56
|
+
- **ops**: Daniel (Operations Lead) · Tomas A. (Automation Engineer) · Isabel (Documentation Writer)
|
|
57
|
+
- **org**: Sofia (Chief Operations Officer) · Afonso (Chief of Staff & Governance Lead) · Carla (People Operations Specialist) · Matilde (Alignment & OKR Steward) · Pedro M. (Organizational Designer)
|
|
58
|
+
- **pm**: Carolina (Product Manager) · Bárbara (Strategic Program Manager) · Jorge (Scrum Master / Agile Coach) · Sara (Product Owner)
|
|
59
|
+
- **quality**: Eduardo (Copy & Language Director) · Francisca (Technical & UX Quality Director) · Marta (Chief Quality Officer)
|
|
60
|
+
- **saas**: Tiago (SaaS Strategist) · Vicente (RevOps Lead) · Andre S. (Growth Lead) · Patricia (Head of Customer Success) · Rita S. (SaaS Metrics & Voice-of-Customer Analyst)
|
|
61
|
+
- **sales**: Miguel (Sales Director) · Ines S. (Sales Operations Analyst) · Joao (Sales Closer) · Martim (SDR / Pre-Sales)
|
|
62
|
+
- **strat**: Tomas (Chief Strategist) · Guilherme (Decision Quality & Strategic Foresight) · Lucas (Market & Competitive Intelligence Analyst) · Marta S. (Business Model Designer)
|
|
63
|
+
|
|
64
|
+
## Stack conventions
|
|
65
|
+
|
|
66
|
+
Apply the section matching the files you touch.
|
|
67
|
+
|
|
68
|
+
### Laravel Stack Conventions
|
|
69
|
+
|
|
70
|
+
- Services + Repositories pattern; no logic in controllers.
|
|
71
|
+
- Form Requests for all input validation.
|
|
72
|
+
- API Resources for response shaping.
|
|
73
|
+
- Feature Tests with RefreshDatabase trait.
|
|
74
|
+
- Eloquent relationships over raw joins.
|
|
75
|
+
- Policies for authorization; never inline ability checks.
|
|
76
|
+
- Queued jobs for slow work; never block the request cycle.
|
|
77
|
+
- Conventional commits: `feat(scope): ...`, `fix(scope): ...`.
|
|
78
|
+
|
|
79
|
+
### Node.js / JavaScript Stack Conventions
|
|
80
|
+
|
|
81
|
+
- ESM modules (import/export); no CommonJS `require()`.
|
|
82
|
+
- Support Node and Bun runtimes when writing CLI tooling.
|
|
83
|
+
- Graceful fallbacks when optional dependencies are missing.
|
|
84
|
+
- All paths via `os.homedir()` or `path.join`; never hardcoded.
|
|
85
|
+
- No interactive prompts in headless/CI runs.
|
|
86
|
+
- Prefer built-in `node:` modules over dependencies.
|
|
87
|
+
|
|
88
|
+
### Nuxt Stack Conventions
|
|
89
|
+
|
|
90
|
+
- Composition API only; no Options API.
|
|
91
|
+
- TypeScript everywhere; no plain JS Vue files.
|
|
92
|
+
- `composables/` for shared reactive logic.
|
|
93
|
+
- `useFetch`/`useAsyncData` for server-side data.
|
|
94
|
+
- `~` alias for project root imports.
|
|
95
|
+
- Server routes in `server/api/`; never fetch third parties from components.
|
|
96
|
+
- Tailwind for styling; avoid scoped styles unless necessary.
|
|
97
|
+
|
|
98
|
+
### PHP Stack Conventions
|
|
99
|
+
|
|
100
|
+
- PHP 8.2+ syntax: constructor promotion, readonly, enums, match.
|
|
101
|
+
- `declare(strict_types=1)` in every file.
|
|
102
|
+
- Typed properties, parameters, and return types everywhere.
|
|
103
|
+
- Composer autoload (PSR-4); never `require` project files by path.
|
|
104
|
+
- Exceptions over error returns; never `@` error suppression.
|
|
105
|
+
- Pint (or the project formatter) must pass before a change is done.
|
|
106
|
+
|
|
107
|
+
### Python Stack Conventions
|
|
108
|
+
|
|
109
|
+
- Type hints on every function signature.
|
|
110
|
+
- Pydantic for validation; dataclasses for pure data.
|
|
111
|
+
- `pytest` with fixtures; no `unittest.TestCase`.
|
|
112
|
+
- Functions under 30 lines; one responsibility.
|
|
113
|
+
- Docstrings on public API only; self-documenting code elsewhere.
|
|
114
|
+
- Virtual environments; never global `pip install`.
|
|
115
|
+
|
|
116
|
+
### React / Next.js Stack Conventions
|
|
117
|
+
|
|
118
|
+
- TypeScript everywhere; no plain JSX files.
|
|
119
|
+
- Server Components by default; `"use client"` only when interaction demands it.
|
|
120
|
+
- App Router (`app/`); no new Pages Router code.
|
|
121
|
+
- shadcn/ui + Tailwind for UI primitives.
|
|
122
|
+
- Hooks for shared logic; no HOC or render-prop patterns in new code.
|
|
123
|
+
- Co-locate component, styles, and test; PascalCase component files.
|
|
124
|
+
|
|
125
|
+
### Vue Stack Conventions
|
|
126
|
+
|
|
127
|
+
- Composition API only; no Options API.
|
|
128
|
+
- `<script setup lang="ts">` in every component.
|
|
129
|
+
- Props and emits fully typed (`defineProps`/`defineEmits` generics).
|
|
130
|
+
- Shared reactive logic lives in composables, not mixins.
|
|
131
|
+
- One component per file; PascalCase filenames.
|
|
132
|
+
- v-for always keyed; no index keys on mutable lists.
|
|
133
|
+
|
|
134
|
+
## Scope of this file
|
|
135
|
+
|
|
136
|
+
Instruction-level export for this runtime. The full ArkaOS engine —
|
|
137
|
+
context injection, hooks, enforced quality gates, knowledge base — runs
|
|
138
|
+
on runtimes with a native adapter (`npx arkaos install`). This file
|
|
139
|
+
carries the contract so the team behaves like ArkaOS anywhere.
|
|
@@ -1,34 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { readBundleFile } from "../harness-bundle.js";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
configureHooks(config, installDir) {
|
|
6
|
-
// Codex CLI
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
## Available Commands
|
|
20
|
-
|
|
21
|
-
Use natural language or prefix commands:
|
|
22
|
-
- /do <description> — Universal orchestrator
|
|
23
|
-
- /dev, /mkt, /fin, /strat, /brand, /ops, /ecom, /kb, /saas, /landing, /community, /content
|
|
24
|
-
|
|
25
|
-
## Hooks
|
|
26
|
-
|
|
27
|
-
Codex CLI does not support native hooks. Context is injected via instruction files.
|
|
28
|
-
`;
|
|
29
|
-
|
|
7
|
+
// Codex CLI reads AGENTS.md. Deploy the generated ArkaOS bundle
|
|
8
|
+
// (scripts/harness_gen.py) — full routing table, agent index, and
|
|
9
|
+
// stack conventions — instead of the old pointer to a
|
|
10
|
+
// config/codex-instructions.md that never existed.
|
|
11
|
+
const bundle = readBundleFile("codex", "AGENTS.md");
|
|
12
|
+
if (!bundle) {
|
|
13
|
+
console.warn(
|
|
14
|
+
" Codex bundle missing (harness/codex/AGENTS.md) — " +
|
|
15
|
+
"run scripts/harness_gen.py; skipping AGENTS.md."
|
|
16
|
+
);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
30
19
|
mkdirSync(config.configDir, { recursive: true });
|
|
31
|
-
writeFileSync(
|
|
32
|
-
console.log(" Codex CLI AGENTS.md configured.");
|
|
20
|
+
writeFileSync(join(config.configDir, "AGENTS.md"), bundle);
|
|
21
|
+
console.log(" Codex CLI AGENTS.md configured (ArkaOS bundle).");
|
|
33
22
|
},
|
|
34
23
|
};
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { listBundleFiles, readBundleFile } from "../harness-bundle.js";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
configureHooks(config, installDir) {
|
|
6
|
-
// Cursor
|
|
7
|
-
//
|
|
7
|
+
// Cursor reads .cursor/rules/*.mdc — its native strength is
|
|
8
|
+
// path-scoped rules, so the generated bundle ships one always-on
|
|
9
|
+
// contract rule plus a scoped rule per stack. Replaces the old
|
|
10
|
+
// hand-typed rule with fossilized counts and a pointer to a
|
|
11
|
+
// config/cursor-instructions.md that never existed.
|
|
12
|
+
const files = listBundleFiles("cursor", "rules");
|
|
13
|
+
if (files.length === 0) {
|
|
14
|
+
console.warn(
|
|
15
|
+
" Cursor bundle missing (harness/cursor/rules/) — " +
|
|
16
|
+
"run scripts/harness_gen.py; skipping rules."
|
|
17
|
+
);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
8
20
|
const rulesDir = join(config.configDir, "rules");
|
|
9
21
|
mkdirSync(rulesDir, { recursive: true });
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
You are running inside ArkaOS — The Operating System for AI Agent Teams.
|
|
18
|
-
Load full instructions from: ${join(installDir, "config", "cursor-instructions.md")}
|
|
19
|
-
|
|
20
|
-
## Available Commands
|
|
21
|
-
|
|
22
|
-
Use natural language or prefix commands:
|
|
23
|
-
- /do <description> — Universal orchestrator
|
|
24
|
-
- /dev, /mkt, /fin, /strat, /brand, /ops, /ecom, /kb, /saas, /landing, /community, /content
|
|
25
|
-
|
|
26
|
-
## Agent System
|
|
27
|
-
|
|
28
|
-
ArkaOS has 62 specialized agents across 16 departments. Each request is routed to the appropriate squad.
|
|
29
|
-
`;
|
|
30
|
-
|
|
31
|
-
writeFileSync(join(rulesDir, "arkaos.md"), arkaosRule);
|
|
32
|
-
console.log(" Cursor rules configured.");
|
|
22
|
+
for (const name of files) {
|
|
23
|
+
const content = readBundleFile("cursor", join("rules", name));
|
|
24
|
+
if (content) writeFileSync(join(rulesDir, name), content);
|
|
25
|
+
}
|
|
26
|
+
console.log(
|
|
27
|
+
` Cursor rules configured (${files.length} ArkaOS rules).`
|
|
28
|
+
);
|
|
33
29
|
},
|
|
34
30
|
};
|
|
@@ -1,37 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { writeFileSync, mkdirSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { readBundleFile } from "../harness-bundle.js";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
configureHooks(config, installDir) {
|
|
6
|
-
// Gemini CLI
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## Available Commands
|
|
19
|
-
|
|
20
|
-
Use natural language or prefix commands:
|
|
21
|
-
- /do <description> — Universal orchestrator
|
|
22
|
-
- /dev, /mkt, /fin, /strat, /brand, /ops, /ecom, /kb, /saas, /landing, /community, /content
|
|
23
|
-
|
|
24
|
-
## Tool Mapping
|
|
25
|
-
|
|
26
|
-
Gemini CLI tools map to ArkaOS tools:
|
|
27
|
-
- activate_skill → Skill invocation
|
|
28
|
-
- read_file → Read
|
|
29
|
-
- edit_file → Edit
|
|
30
|
-
- run_command → Bash
|
|
31
|
-
`;
|
|
32
|
-
|
|
7
|
+
// Gemini CLI reads GEMINI.md. Deploy the generated ArkaOS bundle
|
|
8
|
+
// (scripts/harness_gen.py) instead of the old pointer to a
|
|
9
|
+
// config/gemini-instructions.md that never existed.
|
|
10
|
+
const bundle = readBundleFile("gemini", "GEMINI.md");
|
|
11
|
+
if (!bundle) {
|
|
12
|
+
console.warn(
|
|
13
|
+
" Gemini bundle missing (harness/gemini/GEMINI.md) — " +
|
|
14
|
+
"run scripts/harness_gen.py; skipping GEMINI.md."
|
|
15
|
+
);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
33
18
|
mkdirSync(config.configDir, { recursive: true });
|
|
34
|
-
writeFileSync(
|
|
35
|
-
console.log(" Gemini CLI GEMINI.md configured.");
|
|
19
|
+
writeFileSync(join(config.configDir, "GEMINI.md"), bundle);
|
|
20
|
+
console.log(" Gemini CLI GEMINI.md configured (ArkaOS bundle).");
|
|
36
21
|
},
|
|
37
22
|
};
|
package/installer/cli.js
CHANGED
package/installer/doctor.js
CHANGED
|
@@ -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-
|
|
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
|
|
254
|
+
"role": "Component Library Standardizer",
|
|
255
255
|
"department": "brand",
|
|
256
256
|
"tier": 2,
|
|
257
257
|
"model": "sonnet",
|