arkaos 5.12.0 → 5.13.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/THE-ARKAOS-GUIDE.md +1 -1
- package/VERSION +1 -1
- package/bin/arka-py.ps1 +16 -1
- package/config/hooks/_lib/arka_python.ps1 +40 -7
- package/config/hooks/_lib/arka_python.sh +37 -12
- package/config/hooks/_lib/workflow-classifier.sh +25 -6
- package/config/hooks/session-start.ps1 +20 -4
- package/config/hooks/session-start.sh +7 -3
- package/config/hooks/stop.ps1 +36 -118
- package/config/hooks/user-prompt-submit.ps1 +4 -2
- package/core/hooks/stop_governance.py +166 -0
- package/core/shared/temp_paths.py +16 -5
- package/core/workflow/state_reader.sh +7 -1
- package/harness/codex/AGENTS.md +1 -1
- package/harness/copilot/copilot-instructions.md +1 -1
- package/harness/cursor/rules/arkaos.mdc +2 -2
- package/harness/gemini/GEMINI.md +1 -1
- package/harness/opencode/AGENTS.md +1 -1
- package/harness/opencode/agents/arka-architect-gabriel.md +1 -1
- package/harness/opencode/agents/arka-brand-director-valentina.md +1 -1
- package/harness/opencode/agents/arka-cfo-helena.md +1 -1
- package/harness/opencode/agents/arka-chief-of-staff-afonso.md +1 -1
- package/harness/opencode/agents/arka-community-strategist-beatriz.md +1 -1
- package/harness/opencode/agents/arka-content-strategist-rafael.md +1 -1
- package/harness/opencode/agents/arka-conversion-strategist-ines.md +1 -1
- package/harness/opencode/agents/arka-coo-sofia.md +1 -1
- package/harness/opencode/agents/arka-copy-director-eduardo.md +1 -1
- package/harness/opencode/agents/arka-cqo-marta.md +1 -1
- package/harness/opencode/agents/arka-cto-marco.md +1 -1
- package/harness/opencode/agents/arka-design-ops-lead-iris.md +1 -1
- package/harness/opencode/agents/arka-ecom-director-ricardo.md +1 -1
- package/harness/opencode/agents/arka-knowledge-director-clara.md +1 -1
- package/harness/opencode/agents/arka-leadership-director-rodrigo.md +1 -1
- package/harness/opencode/agents/arka-marketing-director-luna.md +1 -1
- package/harness/opencode/agents/arka-ops-lead-daniel.md +1 -1
- package/harness/opencode/agents/arka-pm-director-carolina.md +1 -1
- package/harness/opencode/agents/arka-revops-lead-vicente.md +1 -1
- package/harness/opencode/agents/arka-saas-strategist-tiago.md +1 -1
- package/harness/opencode/agents/arka-sales-director-miguel.md +1 -1
- package/harness/opencode/agents/arka-strategy-director-tomas.md +1 -1
- package/harness/opencode/agents/arka-tech-director-francisca.md +1 -1
- package/harness/opencode/agents/arka-tech-lead-paulo.md +1 -1
- package/harness/opencode/agents/arka-video-producer-simao.md +1 -1
- package/harness/zed/.rules +1 -1
- package/knowledge/skills-manifest.json +1 -1
- package/package.json +1 -1
- package/pyproject.toml +1 -1
package/THE-ARKAOS-GUIDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# The ArkaOS Guide
|
|
2
2
|
|
|
3
|
-
> v5.
|
|
3
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills, 306 commands, 20 ADRs.
|
|
4
4
|
> One file, everything you need to start. Generated by `scripts/guide_gen.py` — never hand-edited.
|
|
5
5
|
|
|
6
6
|
## What it is
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.
|
|
1
|
+
5.13.0
|
package/bin/arka-py.ps1
CHANGED
|
@@ -25,7 +25,22 @@ $libs = @(
|
|
|
25
25
|
foreach ($lib in $libs) {
|
|
26
26
|
if (Test-Path -LiteralPath $lib) { . $lib; break }
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
# Empty/unset means one of two things: the shared resolver was not found at
|
|
29
|
+
# all, or it WAS found and deliberately handed back nothing because every
|
|
30
|
+
# candidate is a Microsoft Store App Execution Alias. A blind `= "python"`
|
|
31
|
+
# here cannot tell those apart, and on a stock Windows box it picks the
|
|
32
|
+
# alias — running the Python install manager, which downloads a full CPython
|
|
33
|
+
# into the caller's cwd. Probe once more, alias-aware, then fail loudly.
|
|
34
|
+
if (-not $env:ARKA_PY) {
|
|
35
|
+
$fallback = Get-Command python -ErrorAction SilentlyContinue
|
|
36
|
+
if ($fallback -and $fallback.Source -notmatch '\\Microsoft\\WindowsApps\\') {
|
|
37
|
+
$env:ARKA_PY = $fallback.Source
|
|
38
|
+
} else {
|
|
39
|
+
[Console]::Error.WriteLine(
|
|
40
|
+
"arka-py: no usable Python interpreter on PATH (none found, or only Store aliases) - run npx arkaos doctor")
|
|
41
|
+
exit 1
|
|
42
|
+
}
|
|
43
|
+
}
|
|
29
44
|
|
|
30
45
|
# ─── Make `-m core.*` resolvable regardless of cwd ────────────────────────
|
|
31
46
|
$root = $env:ARKAOS_ROOT
|
|
@@ -8,9 +8,12 @@
|
|
|
8
8
|
# Resolution order:
|
|
9
9
|
# 1. $env:ARKAOS_PYTHON (explicit override), if it exists.
|
|
10
10
|
# 2. The ArkaOS venv — Scripts\python.exe (Windows) then bin/python.
|
|
11
|
-
# 3. Any
|
|
12
|
-
#
|
|
13
|
-
#
|
|
11
|
+
# 3. Any python/py/python3 on PATH that can `import yaml`, in THAT order
|
|
12
|
+
# (see the comment on the probe loop), skipping the Microsoft Store
|
|
13
|
+
# App Execution Aliases (see Test-StoreAlias).
|
|
14
|
+
# 4. `python` as a last resort — but '' when that name is a Store alias
|
|
15
|
+
# too, because a caller cannot tell an alias from an interpreter and
|
|
16
|
+
# would run it (see Get-ArkaPythonLastResort).
|
|
14
17
|
|
|
15
18
|
function Test-StoreAlias {
|
|
16
19
|
<#
|
|
@@ -30,15 +33,45 @@ function Test-StoreAlias {
|
|
|
30
33
|
tree and a python_install_<timestamp>.log into their repo. Observed
|
|
31
34
|
on Windows 10, Python install manager 26.3.
|
|
32
35
|
|
|
33
|
-
Probing an alias can never help anyway
|
|
34
|
-
|
|
35
|
-
|
|
36
|
+
Probing an alias can never help anyway. Either the manager installs
|
|
37
|
+
a CPython and the probe measures THAT interpreter — a fresh install
|
|
38
|
+
with no pyyaml, so `import yaml` fails and the candidate is rejected
|
|
39
|
+
after paying the full cost — or the install is declined and the stub
|
|
40
|
+
exits without ever running the check. There is no path where probing
|
|
41
|
+
the alias answers the question it was asked.
|
|
36
42
|
#>
|
|
37
43
|
param([string]$Path)
|
|
38
44
|
if ([string]::IsNullOrWhiteSpace($Path)) { return $false }
|
|
39
45
|
return $Path -match '\\Microsoft\\WindowsApps\\'
|
|
40
46
|
}
|
|
41
47
|
|
|
48
|
+
function Get-ArkaPythonLastResort {
|
|
49
|
+
<#
|
|
50
|
+
.SYNOPSIS
|
|
51
|
+
The interpreter to hand back when no probed candidate answered, or
|
|
52
|
+
'' when the only name left is a Store alias.
|
|
53
|
+
|
|
54
|
+
.DESCRIPTION
|
|
55
|
+
Extracted from Resolve-ArkaPython so the branch is reachable from a
|
|
56
|
+
test: in place it sits behind a probe that matches on any machine
|
|
57
|
+
with a working interpreter.
|
|
58
|
+
|
|
59
|
+
Returning the bare string "python" from here was the hole in this
|
|
60
|
+
file's own guard. Every caller gates on `-and $env:ARKA_PY`, and any
|
|
61
|
+
non-empty string is truthy in PowerShell, so an aliased "python"
|
|
62
|
+
passed the gate and was then run — the exact install-manager side
|
|
63
|
+
effect Test-StoreAlias exists to prevent, arriving through the
|
|
64
|
+
fallback instead of the probe. '' is the only value that makes the
|
|
65
|
+
callers degrade, so '' is what a box with nothing but aliases gets.
|
|
66
|
+
|
|
67
|
+
Mirror of arka_python_last_resort() in arka_python.sh.
|
|
68
|
+
#>
|
|
69
|
+
param([string]$Name = "python")
|
|
70
|
+
$cmd = Get-Command $Name -ErrorAction SilentlyContinue
|
|
71
|
+
if ($cmd -and -not (Test-StoreAlias $cmd.Source)) { return $cmd.Source }
|
|
72
|
+
return ""
|
|
73
|
+
}
|
|
74
|
+
|
|
42
75
|
function Resolve-ArkaPython {
|
|
43
76
|
if ($env:ARKAOS_PYTHON -and (Test-Path -LiteralPath $env:ARKAOS_PYTHON)) {
|
|
44
77
|
return $env:ARKAOS_PYTHON
|
|
@@ -67,7 +100,7 @@ function Resolve-ArkaPython {
|
|
|
67
100
|
}
|
|
68
101
|
}
|
|
69
102
|
|
|
70
|
-
return
|
|
103
|
+
return (Get-ArkaPythonLastResort)
|
|
71
104
|
}
|
|
72
105
|
|
|
73
106
|
# Windows mirror of arka_resolve_root() in arka_python.sh: env override wins
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
# Contract of arka_resolve_python():
|
|
11
11
|
# Echoes the interpreter path and returns 0 when a provisioned ArkaOS
|
|
12
12
|
# interpreter is found; echoes a best-effort fallback and returns 1 when
|
|
13
|
-
# only a bare `python3` remains (caller degrades gracefully).
|
|
13
|
+
# only a bare `python3` remains (caller degrades gracefully). Echoes
|
|
14
|
+
# NOTHING and returns 1 when every remaining candidate is a Microsoft
|
|
15
|
+
# Store App Execution Alias — see arka_python_last_resort().
|
|
14
16
|
#
|
|
15
17
|
# Resolution order:
|
|
16
18
|
# 1. $ARKAOS_PYTHON (explicit operator override), if executable.
|
|
@@ -18,7 +20,39 @@
|
|
|
18
20
|
# python3. `[ -x ]` follows symlinks, so a Homebrew-rotated broken
|
|
19
21
|
# symlink is skipped automatically.
|
|
20
22
|
# 3. Any python3 on PATH / known locations that can `import yaml`.
|
|
21
|
-
# 4. Bare `python3` as a last resort (return 1)
|
|
23
|
+
# 4. Bare `python3` as a last resort (return 1), or nothing at all when
|
|
24
|
+
# that name — and `python` behind it — is only a Store alias.
|
|
25
|
+
|
|
26
|
+
# Last-resort name selection, extracted from arka_resolve_python() so the
|
|
27
|
+
# branch is reachable from a test: in place it sits behind a PATH probe
|
|
28
|
+
# that matches on every POSIX box with a yaml-capable python3, so it can
|
|
29
|
+
# only be exercised on the machine it was written for.
|
|
30
|
+
#
|
|
31
|
+
# Contract: echoes the name to hand back, or NOTHING when every remaining
|
|
32
|
+
# candidate is a Store alias. Empty is the point, not an oversight. The
|
|
33
|
+
# callers gate on `command -v "$ARKA_PY"` and an alias stub PASSES that
|
|
34
|
+
# gate — the file is real, it is just the Python install manager rather
|
|
35
|
+
# than an interpreter — so the only value that degrades a hook instead of
|
|
36
|
+
# downloading a CPython into the user's project is no value at all.
|
|
37
|
+
arka_python_last_resort() {
|
|
38
|
+
local py3 py
|
|
39
|
+
py3="$(command -v python3 2>/dev/null)"
|
|
40
|
+
case "$py3" in
|
|
41
|
+
*[Ww]indows[Aa]pps*) ;;
|
|
42
|
+
# Absent or real: the documented `python3` contract, unchanged. POSIX
|
|
43
|
+
# never reaches the alias branch below.
|
|
44
|
+
*) printf '%s\n' "python3"; return 0 ;;
|
|
45
|
+
esac
|
|
46
|
+
|
|
47
|
+
# `python3` is the alias. On a Windows box that HAS a real interpreter,
|
|
48
|
+
# `python` is the name it answers to; on a stock box with none, that is
|
|
49
|
+
# an alias too and we must hand back nothing.
|
|
50
|
+
py="$(command -v python 2>/dev/null)"
|
|
51
|
+
case "$py" in
|
|
52
|
+
"" | *[Ww]indows[Aa]pps*) return 0 ;;
|
|
53
|
+
esac
|
|
54
|
+
printf '%s\n' "python"
|
|
55
|
+
}
|
|
22
56
|
|
|
23
57
|
arka_resolve_python() {
|
|
24
58
|
local cand
|
|
@@ -67,16 +101,7 @@ arka_resolve_python() {
|
|
|
67
101
|
fi
|
|
68
102
|
done
|
|
69
103
|
|
|
70
|
-
|
|
71
|
-
# except where that name is the Store alias: handing an alias back to a
|
|
72
|
-
# caller that will `exec` it is the very trap this function now avoids.
|
|
73
|
-
case "$(command -v python3 2>/dev/null)" in
|
|
74
|
-
*[Ww]indows[Aa]pps*)
|
|
75
|
-
printf '%s\n' "python"
|
|
76
|
-
return 1
|
|
77
|
-
;;
|
|
78
|
-
esac
|
|
79
|
-
printf '%s\n' "python3"
|
|
104
|
+
arka_python_last_resort
|
|
80
105
|
return 1
|
|
81
106
|
}
|
|
82
107
|
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
# ArkaOS v2 — Shared Workflow Classifier
|
|
4
4
|
#
|
|
5
5
|
# Decides whether a user prompt triggers the 4-gate evidence flow.
|
|
6
|
-
#
|
|
6
|
+
#
|
|
7
|
+
# CLI AND TEST SURFACE ONLY — no hook sources this file. The runtime path
|
|
8
|
+
# is core/hooks/user_prompt_submit.py, which user-prompt-submit.sh execs;
|
|
9
|
+
# these functions survive as the documented CLI (see the dispatcher at the
|
|
10
|
+
# bottom) and as the bash half of the parity contract. That is precisely
|
|
11
|
+
# why the two implementations must be diffed by hand: nothing at runtime
|
|
12
|
+
# will ever notice them disagreeing.
|
|
7
13
|
#
|
|
8
14
|
# Contract:
|
|
9
15
|
# arka_wf_classify "<prompt text>" → echoes "true" or "false", exits 0.
|
|
@@ -11,9 +17,11 @@
|
|
|
11
17
|
# arka_wf_is_required "<session_id>" → exits 0 if required, 1 otherwise.
|
|
12
18
|
# arka_wf_clear_required "<session_id>" → removes marker file.
|
|
13
19
|
#
|
|
14
|
-
# Markers live under
|
|
15
|
-
#
|
|
16
|
-
#
|
|
20
|
+
# Markers live under $ARKA_WF_REQUIRED_DIR/<session_id>, defaulting to
|
|
21
|
+
# /tmp/arkaos-wf-required (see below). The override is the seam that keeps
|
|
22
|
+
# writer and reader on the same directory — core/shared/temp_paths.py
|
|
23
|
+
# ::wf_required_dir is the Python side of it. mark/clear here write the
|
|
24
|
+
# marker file directly; they do NOT call flow_enforcer.py.
|
|
17
25
|
# ============================================================================
|
|
18
26
|
|
|
19
27
|
ARKA_WF_REQUIRED_DIR="${ARKA_WF_REQUIRED_DIR:-/tmp/arkaos-wf-required}"
|
|
@@ -65,11 +73,22 @@ arka_wf_classify() {
|
|
|
65
73
|
|
|
66
74
|
# Question guard: interrogative lead + trailing "?" = information
|
|
67
75
|
# question, never creation intent (X5 false positive).
|
|
68
|
-
|
|
76
|
+
#
|
|
77
|
+
# The lead is taken from the FIRST NON-BLANK LINE, never from the whole
|
|
78
|
+
# text. The Python twin uses re.match on text.strip(), which can only
|
|
79
|
+
# match at offset 0; grep anchors ^ PER LINE, so feeding it everything
|
|
80
|
+
# made any later line able to trigger the guard. The two then disagreed
|
|
81
|
+
# on every multi-line prompt ending in a question — "implementa X\no que
|
|
82
|
+
# e que isto faz?" is a directive followed by a question, and a directive
|
|
83
|
+
# still requires the flow. awk reproduces .strip() closely enough for an
|
|
84
|
+
# anchor that already tolerates leading whitespace: skip blank lines,
|
|
85
|
+
# print the first line with content, stop.
|
|
86
|
+
local trimmed lead
|
|
69
87
|
trimmed=$(printf '%s' "$text" | sed 's/[[:space:]]*$//')
|
|
70
88
|
case "$trimmed" in
|
|
71
89
|
*\?)
|
|
72
|
-
|
|
90
|
+
lead=$(printf '%s' "$text" | awk 'NF { print; exit }')
|
|
91
|
+
if printf '%s' "$lead" | grep -qiE "$ARKA_WF_QUESTION_LEAD"; then
|
|
73
92
|
echo "false"
|
|
74
93
|
return 0
|
|
75
94
|
fi
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
# (core.hooks.session_start) builds the whole payload: the visible banner in
|
|
6
6
|
# "systemMessage" AND the operating contracts in
|
|
7
7
|
# hookSpecificOutput.additionalContext. This file only resolves the
|
|
8
|
-
# interpreter and delegates;
|
|
9
|
-
#
|
|
8
|
+
# interpreter and delegates; whenever it cannot reach that producer — no
|
|
9
|
+
# repo root, no module file, no interpreter, or the module itself exiting
|
|
10
|
+
# non-zero — it emits a static banner and exits 0 (fail-open,
|
|
11
|
+
# dependency-free).
|
|
10
12
|
#
|
|
11
13
|
# WHY A WRAPPER AND NOT A PORT
|
|
12
14
|
# The previous version reimplemented the banner natively in PowerShell. It
|
|
@@ -16,7 +18,10 @@
|
|
|
16
18
|
# (EVIDENCE-FLOW, META-TAG, AUTHORITY, MODEL-FABRIC) were computed by nobody
|
|
17
19
|
# and never reached the model, while the Linux side got them every session.
|
|
18
20
|
# Reimplementing the blocks here would duplicate the producer and recreate
|
|
19
|
-
# the same drift one release later
|
|
21
|
+
# the same drift one release later, so this file delegates instead. The
|
|
22
|
+
# twin-parity test in tests/python/test_hook_output_contract.py is what
|
|
23
|
+
# holds that open: it asserts both wrappers run `-m core.hooks
|
|
24
|
+
# .session_start`, and fails if either stops.
|
|
20
25
|
#
|
|
21
26
|
# Minimum PowerShell: 5.1 (shipped with every Windows 10+). No pwsh 7 prereq.
|
|
22
27
|
# This file stays pure ASCII; every non-ASCII byte in the output comes from
|
|
@@ -73,8 +78,19 @@ if ($repo -and $moduleFile -and (Test-Path -LiteralPath $moduleFile) -and $env:A
|
|
|
73
78
|
# --- Degraded fallback: static banner, valid JSON, exit 0 ------------------
|
|
74
79
|
# Same contract as the .sh fallback. Built from [char] codes so this source
|
|
75
80
|
# file needs no particular encoding to produce correct output.
|
|
81
|
+
#
|
|
82
|
+
# The message names the SYMPTOM, not a cause. Four conditions reach this
|
|
83
|
+
# line (see the guard above) and only one of them is a missing interpreter;
|
|
84
|
+
# the fourth — the module running and exiting non-zero — asserts the
|
|
85
|
+
# opposite. The .sh twin execs, so its fallback is unreachable once an
|
|
86
|
+
# interpreter is launched and the narrower wording survived there; this
|
|
87
|
+
# port falls through on $LASTEXITCODE, which is what made it false. Sending
|
|
88
|
+
# a Windows operator with a healthy Python to debug their Python, when the
|
|
89
|
+
# real fault is a stale ~/.arkaos/.repo-path, costs more than the wording
|
|
90
|
+
# saves. `npx arkaos doctor` diagnoses all four.
|
|
76
91
|
$tri = [char]0x25B2
|
|
77
92
|
$oAcute = [char]0x00F3
|
|
78
|
-
$
|
|
93
|
+
$emDash = [char]0x2014
|
|
94
|
+
$banner = "`n $tri A R K A O S`n The Operating System for AI Agent Teams`n`n Ol$oAcute, founder`n degraded: ArkaOS core not reachable $emDash run npx arkaos doctor"
|
|
79
95
|
[pscustomobject]@{ systemMessage = $banner } | ConvertTo-Json -Compress
|
|
80
96
|
exit 0
|
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
# ONE python process (core.hooks.session_start) builds the entire
|
|
6
6
|
# systemMessage — the 13 inline python spawns of the previous version
|
|
7
7
|
# live there now (baseline 251ms p50 before consolidation). This file
|
|
8
|
-
# only resolves the interpreter and execs;
|
|
9
|
-
#
|
|
8
|
+
# only resolves the interpreter and execs; whenever it cannot reach that
|
|
9
|
+
# producer — no repo root, no module file, no interpreter — it emits a
|
|
10
|
+
# static banner and exits 0 (fail-open, stdlib-free).
|
|
10
11
|
# ============================================================================
|
|
11
12
|
|
|
12
13
|
# _HOOK_CWD captured BEFORE any cd — inside a compound command $PWD
|
|
@@ -55,7 +56,10 @@ if [ -n "$REPO" ] && [ -f "$REPO/core/hooks/session_start.py" ] \
|
|
|
55
56
|
fi
|
|
56
57
|
|
|
57
58
|
# ─── Degraded fallback: static banner, valid JSON, exit 0 ──────────────
|
|
59
|
+
# Names the symptom, not a cause: three conditions reach here and only one
|
|
60
|
+
# of them is a missing interpreter. Kept byte-identical in wording to the
|
|
61
|
+
# .ps1 twin so an operator on either platform reads the same diagnosis.
|
|
58
62
|
cat <<'EOF'
|
|
59
|
-
{"systemMessage": "\n ▲ A R K A O S\n The Operating System for AI Agent Teams\n\n Olá, founder\n degraded:
|
|
63
|
+
{"systemMessage": "\n ▲ A R K A O S\n The Operating System for AI Agent Teams\n\n Olá, founder\n degraded: ArkaOS core not reachable — run npx arkaos doctor"}
|
|
60
64
|
EOF
|
|
61
65
|
exit 0
|
package/config/hooks/stop.ps1
CHANGED
|
@@ -24,9 +24,15 @@ $cwd = [string]$inp.cwd
|
|
|
24
24
|
|
|
25
25
|
if ($stopHookActive -eq "true") { exit 0 }
|
|
26
26
|
|
|
27
|
-
# Marker dir must match the Python writer
|
|
28
|
-
# core.shared.temp_paths
|
|
29
|
-
#
|
|
27
|
+
# Marker dir must match the Python writer: core.hooks.user_prompt_submit
|
|
28
|
+
# ::_wf_mark_required resolves it through core.shared.temp_paths
|
|
29
|
+
# ::wf_required_dir — which is arkaos_temp_dir('arkaos-wf-required'),
|
|
30
|
+
# i.e. %TEMP%\arkaos-wf-required on Windows, EXCEPT that it honors
|
|
31
|
+
# ARKA_WF_REQUIRED_DIR first. Read arkaos_temp_dir directly here and the
|
|
32
|
+
# override splits writer from reader: the writer moves, this gate finds no
|
|
33
|
+
# marker and allows everything, silently. That is the fail-open
|
|
34
|
+
# wf_required_dir exists to close, so mirror wf_required_dir, not
|
|
35
|
+
# arkaos_temp_dir.
|
|
30
36
|
# The previous hardcoded "/tmp/arkaos-wf-required" resolves to a path that
|
|
31
37
|
# exists on no stock Windows machine, so this gate exited 0 on every real
|
|
32
38
|
# session and the whole compliance chain below never ran.
|
|
@@ -204,131 +210,43 @@ try {
|
|
|
204
210
|
}
|
|
205
211
|
|
|
206
212
|
# ─── Governance parity (skill capture + warn-only detectors) ───────────
|
|
207
|
-
# config/hooks/stop.sh delegates the whole event to `python -m
|
|
208
|
-
#
|
|
209
|
-
#
|
|
213
|
+
# config/hooks/stop.sh delegates the whole event to `python -m` the Stop
|
|
214
|
+
# entrypoint, which runs the full detector chain (the authoritative list
|
|
215
|
+
# is that module's own imports — no count is stated here because several
|
|
216
|
+
# are conditional, so no fixed number is true of a given event). This
|
|
217
|
+
# port reimplements the event and reached only two of them, so four
|
|
210
218
|
# detectors that exist, are tested and are wired on POSIX never ran on
|
|
211
219
|
# Windows at all — most visibly skill_proposer, whose constitution rule
|
|
212
220
|
# (mandatory-skill-evaluation) mandates a capability sweep after every
|
|
213
221
|
# completed task.
|
|
214
222
|
#
|
|
223
|
+
# The sweep is a real module, not an inline script: core/hooks/
|
|
224
|
+
# stop_governance.py. Delegating rather than mirroring is what keeps the
|
|
225
|
+
# owner-only umask on the state files it writes — the previous inline
|
|
226
|
+
# copy of _write_tmp_state had already lost it — and it is what lets the
|
|
227
|
+
# parity test IMPORT AND RUN the sweep instead of grepping module names
|
|
228
|
+
# out of this file, which a comment could satisfy.
|
|
229
|
+
#
|
|
215
230
|
# Scope is deliberately the NON-ENFORCEMENT subset: these four write
|
|
216
231
|
# proposals and diagnostic state only. The gating checks
|
|
217
232
|
# (closing_marker_check, meta_tag_check, kb_cite_check, dna_fidelity)
|
|
218
233
|
# are left out of this change — they feed enforcement surfaces and
|
|
219
234
|
# deserve their own baseline on Windows before being switched on.
|
|
220
|
-
$
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
try:
|
|
237
|
-
msgs = _load_last_assistant_messages(transcript_path, n=1)
|
|
238
|
-
last = msgs[-1] if msgs else ""
|
|
239
|
-
except Exception:
|
|
240
|
-
last = ""
|
|
241
|
-
|
|
242
|
-
raw = None
|
|
243
|
-
try:
|
|
244
|
-
raw = Path(transcript_path).read_text(encoding="utf-8", errors="replace")
|
|
245
|
-
except Exception:
|
|
246
|
-
raw = None
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
def _write_tmp_state(prefix, sid, payload):
|
|
250
|
-
"""Mirror of core.hooks.stop._write_tmp_state (best-effort)."""
|
|
251
|
-
if not sid:
|
|
252
|
-
return
|
|
253
|
-
try:
|
|
254
|
-
import json
|
|
255
|
-
|
|
256
|
-
from core.shared.temp_paths import arkaos_temp_dir
|
|
257
|
-
|
|
258
|
-
target = arkaos_temp_dir(prefix)
|
|
259
|
-
target.mkdir(parents=True, exist_ok=True)
|
|
260
|
-
(target / f"{sid}.json").write_text(
|
|
261
|
-
json.dumps(payload), encoding="utf-8"
|
|
262
|
-
)
|
|
263
|
-
except Exception:
|
|
264
|
-
pass
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
safe_sid = None
|
|
268
|
-
try:
|
|
269
|
-
from core.shared.safe_session_id import safe_session_id
|
|
270
|
-
|
|
271
|
-
safe_sid = safe_session_id(session_id)
|
|
272
|
-
except Exception:
|
|
273
|
-
safe_sid = None
|
|
274
|
-
|
|
275
|
-
# 1. Capability capture — the constitution rule this port was missing.
|
|
276
|
-
try:
|
|
277
|
-
from core.governance.skill_proposer import evaluate as _eval_skill
|
|
278
|
-
|
|
279
|
-
_eval_skill(last)
|
|
280
|
-
except Exception:
|
|
281
|
-
pass
|
|
282
|
-
|
|
283
|
-
# 2. Sycophancy (warn-only telemetry).
|
|
284
|
-
try:
|
|
285
|
-
from core.governance.sycophancy_detector import detect_sycophancy
|
|
286
|
-
|
|
287
|
-
sv = detect_sycophancy(last)
|
|
288
|
-
if sv.is_sycophantic and safe_sid:
|
|
289
|
-
_write_tmp_state("arkaos-sycophancy", safe_sid, {
|
|
290
|
-
"is_sycophantic": sv.is_sycophantic,
|
|
291
|
-
"signals": sv.signals,
|
|
292
|
-
"confidence": sv.confidence,
|
|
293
|
-
})
|
|
294
|
-
except Exception:
|
|
295
|
-
pass
|
|
296
|
-
|
|
297
|
-
# 3. Phantom actions — narrated effects with no tool call in the turn.
|
|
298
|
-
try:
|
|
299
|
-
from core.governance.phantom_action_check import check_phantom_actions
|
|
300
|
-
|
|
301
|
-
pr = check_phantom_actions(last, raw)
|
|
302
|
-
if safe_sid:
|
|
303
|
-
_write_tmp_state("arkaos-phantom", safe_sid, {
|
|
304
|
-
"passed": pr.passed,
|
|
305
|
-
"reason": pr.reason,
|
|
306
|
-
"claims": pr.claims,
|
|
307
|
-
"suggestion": pr.suggestion,
|
|
308
|
-
})
|
|
309
|
-
except Exception:
|
|
310
|
-
pass
|
|
311
|
-
|
|
312
|
-
# 4. Tool loops.
|
|
313
|
-
try:
|
|
314
|
-
from core.governance.tool_loop_check import check_tool_loops
|
|
315
|
-
|
|
316
|
-
lv = check_tool_loops(raw)
|
|
317
|
-
if lv.detected and safe_sid:
|
|
318
|
-
_write_tmp_state("arkaos-tool-loop", safe_sid, {
|
|
319
|
-
"tool": lv.tool,
|
|
320
|
-
"repeats": lv.repeats,
|
|
321
|
-
"pattern": lv.pattern,
|
|
322
|
-
"total_tool_uses": lv.total_tool_uses,
|
|
323
|
-
})
|
|
324
|
-
except Exception:
|
|
325
|
-
pass
|
|
326
|
-
'@
|
|
327
|
-
|
|
328
|
-
try {
|
|
329
|
-
$governanceScript | & $pythonExe - | Out-Null
|
|
330
|
-
} catch {
|
|
331
|
-
# Swallow — governance observation must never affect the Stop hook.
|
|
235
|
+
$governanceModule = Join-Path $env:ARKAOS_ROOT "core/hooks/stop_governance.py"
|
|
236
|
+
if (Test-Path -LiteralPath $governanceModule) {
|
|
237
|
+
# PREPEND, never clobber: an operator's own PYTHONPATH must survive
|
|
238
|
+
# the hook (the .sh twin prepends for the same reason).
|
|
239
|
+
$sep = [IO.Path]::PathSeparator
|
|
240
|
+
$env:PYTHONPATH = if ($env:PYTHONPATH) {
|
|
241
|
+
"$($env:ARKAOS_ROOT)$sep$($env:PYTHONPATH)"
|
|
242
|
+
} else {
|
|
243
|
+
$env:ARKAOS_ROOT
|
|
244
|
+
}
|
|
245
|
+
try {
|
|
246
|
+
& $pythonExe -m core.hooks.stop_governance | Out-Null
|
|
247
|
+
} catch {
|
|
248
|
+
# Swallow — governance observation must never affect the Stop hook.
|
|
249
|
+
}
|
|
332
250
|
}
|
|
333
251
|
|
|
334
252
|
# Belt-and-braces marker cleanup (safe even if the Python block crashed).
|
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
# called the workflow classifier, so the wf-required marker was never
|
|
19
19
|
# created on Windows: the per-prompt half of the evidence flow (and the
|
|
20
20
|
# whole compliance chain behind the Stop hook) was dead on this platform.
|
|
21
|
-
# Same failure mode as session-start.ps1 (twin drift)
|
|
22
|
-
#
|
|
21
|
+
# Same failure mode as session-start.ps1 (twin drift), and the same fix:
|
|
22
|
+
# delegate, and let the twin-parity test in tests/python/
|
|
23
|
+
# test_hook_output_contract.py fail the build if this file ever stops
|
|
24
|
+
# running `-m core.hooks.user_prompt_submit`.
|
|
23
25
|
#
|
|
24
26
|
# Minimum PowerShell: 5.1. This file stays pure ASCII; every non-ASCII byte
|
|
25
27
|
# in the output comes from Python's UTF-8 stdout.
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"""Warn-only governance sweep for the Windows Stop hook.
|
|
2
|
+
|
|
3
|
+
``config/hooks/stop.sh`` hands the whole Stop event to
|
|
4
|
+
``core.hooks.stop``. ``stop.ps1`` cannot yet: it reimplements the event,
|
|
5
|
+
and this sweep used to live inside it as a ~100-line Python here-string --
|
|
6
|
+
source that no linter, no type checker and no test could reach, and that
|
|
7
|
+
a PowerShell drift guard could only ever inspect as text.
|
|
8
|
+
|
|
9
|
+
Promoting it to a module buys two things that a here-string cannot:
|
|
10
|
+
|
|
11
|
+
* ``_write_tmp_state`` is IMPORTED from ``core.hooks.stop`` instead of
|
|
12
|
+
hand-copied. The copy had silently dropped the ``umask(0o077)``
|
|
13
|
+
hardening and wrote ``0644``/``0755`` where the original writes
|
|
14
|
+
``0600``/``0700`` -- on transcript-derived payloads (sycophancy
|
|
15
|
+
signals, phantom-action claims quoting assistant text) which, under the
|
|
16
|
+
PowerShell adapter on POSIX, land in a shared ``/tmp``. Importing makes
|
|
17
|
+
that class of loss impossible rather than merely tested-for.
|
|
18
|
+
* the parity test IMPORTS AND RUNS this module. The guard it replaced
|
|
19
|
+
asserted module names were present as substrings of the .ps1, which a
|
|
20
|
+
comment satisfies: the whole port could be neutered with every name
|
|
21
|
+
left in place and all five tests still passed.
|
|
22
|
+
|
|
23
|
+
Scope is deliberately the NON-ENFORCEMENT subset. These detectors write
|
|
24
|
+
proposals and diagnostic state; nothing reads their output to gate
|
|
25
|
+
anything. The gating checks stay deferred with a recorded reason each --
|
|
26
|
+
see ``DEFERRED_IN_PS1`` in
|
|
27
|
+
``tests/python/test_stop_ps1_governance_parity.py``.
|
|
28
|
+
|
|
29
|
+
Every detector is fire-and-forget: a failure is skipped, never raised.
|
|
30
|
+
Observation must not be able to break the turn.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
from __future__ import annotations
|
|
34
|
+
|
|
35
|
+
import contextlib
|
|
36
|
+
import os
|
|
37
|
+
from collections.abc import Callable
|
|
38
|
+
from pathlib import Path
|
|
39
|
+
|
|
40
|
+
# Imported, never mirrored -- see the module docstring.
|
|
41
|
+
from core.hooks.stop import _write_tmp_state
|
|
42
|
+
|
|
43
|
+
Detector = Callable[[str, str | None, str | None], None]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def _run_skill_proposer(last: str, raw: str | None, safe_sid: str | None) -> None:
|
|
47
|
+
"""Capability sweep — constitution rule ``mandatory-skill-evaluation``.
|
|
48
|
+
|
|
49
|
+
The regression this whole port exists for: it ran on POSIX every turn
|
|
50
|
+
and had never run on Windows once.
|
|
51
|
+
"""
|
|
52
|
+
from core.governance.skill_proposer import evaluate
|
|
53
|
+
|
|
54
|
+
evaluate(last)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _run_sycophancy(last: str, raw: str | None, safe_sid: str | None) -> None:
|
|
58
|
+
from core.governance.sycophancy_detector import detect_sycophancy
|
|
59
|
+
|
|
60
|
+
verdict = detect_sycophancy(last)
|
|
61
|
+
if verdict.is_sycophantic and safe_sid:
|
|
62
|
+
_write_tmp_state("arkaos-sycophancy", safe_sid, {
|
|
63
|
+
"is_sycophantic": verdict.is_sycophantic,
|
|
64
|
+
"signals": verdict.signals,
|
|
65
|
+
"confidence": verdict.confidence,
|
|
66
|
+
})
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _run_phantom_actions(last: str, raw: str | None, safe_sid: str | None) -> None:
|
|
70
|
+
from core.governance.phantom_action_check import check_phantom_actions
|
|
71
|
+
|
|
72
|
+
result = check_phantom_actions(last, raw)
|
|
73
|
+
if safe_sid:
|
|
74
|
+
_write_tmp_state("arkaos-phantom", safe_sid, {
|
|
75
|
+
"passed": result.passed,
|
|
76
|
+
"reason": result.reason,
|
|
77
|
+
"claims": result.claims,
|
|
78
|
+
"suggestion": result.suggestion,
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _run_tool_loops(last: str, raw: str | None, safe_sid: str | None) -> None:
|
|
83
|
+
from core.governance.tool_loop_check import check_tool_loops
|
|
84
|
+
|
|
85
|
+
verdict = check_tool_loops(raw)
|
|
86
|
+
if verdict.detected and safe_sid:
|
|
87
|
+
_write_tmp_state("arkaos-tool-loop", safe_sid, {
|
|
88
|
+
"tool": verdict.tool,
|
|
89
|
+
"repeats": verdict.repeats,
|
|
90
|
+
"pattern": verdict.pattern,
|
|
91
|
+
"total_tool_uses": verdict.total_tool_uses,
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
# The ledger the parity test drives. A name here is a claim that the
|
|
96
|
+
# module RUNS; the test proves it by substituting each detector and
|
|
97
|
+
# asserting it was reached, so an entry cannot be satisfied by its own
|
|
98
|
+
# presence.
|
|
99
|
+
DETECTORS: tuple[tuple[str, Detector], ...] = (
|
|
100
|
+
("core.governance.skill_proposer", _run_skill_proposer),
|
|
101
|
+
("core.governance.sycophancy_detector", _run_sycophancy),
|
|
102
|
+
("core.governance.phantom_action_check", _run_phantom_actions),
|
|
103
|
+
("core.governance.tool_loop_check", _run_tool_loops),
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def run(last: str, raw: str | None, safe_sid: str | None) -> list[str]:
|
|
108
|
+
"""Run every detector; return the names that completed.
|
|
109
|
+
|
|
110
|
+
The return value exists for the parity test -- a caller in the hook
|
|
111
|
+
discards it. One detector raising must not stop the others, which is
|
|
112
|
+
why this is a loop over a table and not four nested try blocks.
|
|
113
|
+
"""
|
|
114
|
+
completed: list[str] = []
|
|
115
|
+
for name, detector in DETECTORS:
|
|
116
|
+
try:
|
|
117
|
+
detector(last, raw, safe_sid)
|
|
118
|
+
except Exception:
|
|
119
|
+
continue
|
|
120
|
+
completed.append(name)
|
|
121
|
+
return completed
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _last_assistant_message(transcript_path: str) -> str:
|
|
125
|
+
with contextlib.suppress(Exception):
|
|
126
|
+
from core.workflow.flow_enforcer import _load_last_assistant_messages
|
|
127
|
+
|
|
128
|
+
messages = _load_last_assistant_messages(transcript_path, n=1)
|
|
129
|
+
return messages[-1] if messages else ""
|
|
130
|
+
return ""
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def _raw_transcript(transcript_path: str) -> str | None:
|
|
134
|
+
with contextlib.suppress(Exception):
|
|
135
|
+
return Path(transcript_path).read_text(encoding="utf-8", errors="replace")
|
|
136
|
+
return None
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def _safe_sid(session_id: str) -> str | None:
|
|
140
|
+
with contextlib.suppress(Exception):
|
|
141
|
+
from core.shared.safe_session_id import safe_session_id
|
|
142
|
+
|
|
143
|
+
return safe_session_id(session_id)
|
|
144
|
+
return None
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def main() -> int:
|
|
148
|
+
"""Entry point for ``python -m core.hooks.stop_governance``.
|
|
149
|
+
|
|
150
|
+
Reads the same environment contract the sibling blocks in stop.ps1
|
|
151
|
+
use (``TRANSCRIPT_PATH_VAL`` / ``SESSION_ID_VAL``). Always returns 0:
|
|
152
|
+
the Stop hook is warn-only and must never fail the turn.
|
|
153
|
+
"""
|
|
154
|
+
transcript_path = os.environ.get("TRANSCRIPT_PATH_VAL", "")
|
|
155
|
+
if not transcript_path:
|
|
156
|
+
return 0
|
|
157
|
+
run(
|
|
158
|
+
_last_assistant_message(transcript_path),
|
|
159
|
+
_raw_transcript(transcript_path),
|
|
160
|
+
_safe_sid(os.environ.get("SESSION_ID_VAL", "")),
|
|
161
|
+
)
|
|
162
|
+
return 0
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
if __name__ == "__main__":
|
|
166
|
+
raise SystemExit(main())
|
|
@@ -44,11 +44,22 @@ def wf_required_dir() -> Path:
|
|
|
44
44
|
"""Directory holding the workflow-required markers.
|
|
45
45
|
|
|
46
46
|
Honors ``ARKA_WF_REQUIRED_DIR`` — the same override the bash
|
|
47
|
-
classifier (``_lib/workflow-classifier.sh``) reads.
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
classifier (``_lib/workflow-classifier.sh``) reads.
|
|
48
|
+
|
|
49
|
+
It lives here and not at each call site because the override used to
|
|
50
|
+
reach some participants and not others. ``user_prompt_submit
|
|
51
|
+
::_wf_mark_required`` honored it; ``stop.main`` and
|
|
52
|
+
``flow_enforcer.FLOW_REQUIRED_DIR`` resolved the default directly. So
|
|
53
|
+
setting the variable moved the writer, left those two readers on
|
|
54
|
+
``/tmp``, and the gate found no marker and allowed everything —
|
|
55
|
+
silently, which is the part that made it expensive. Note that
|
|
56
|
+
``flow_enforcer`` is on both sides of that line: ``mark_flow_required``
|
|
57
|
+
writes through the same constant the evaluator reads.
|
|
58
|
+
|
|
59
|
+
One resolver — but not one resolution moment: ``flow_enforcer`` binds
|
|
60
|
+
the constant at import, while the hooks call this per event. Processes
|
|
61
|
+
started after the variable is set all agree; a test that sets it after
|
|
62
|
+
importing ``flow_enforcer`` will not move that reader.
|
|
52
63
|
"""
|
|
53
64
|
override = os.environ.get("ARKA_WF_REQUIRED_DIR")
|
|
54
65
|
return Path(override) if override else arkaos_temp_dir("arkaos-wf-required")
|
|
@@ -10,7 +10,13 @@
|
|
|
10
10
|
for _l in "$(dirname "${BASH_SOURCE[0]:-$0}")/../../config/hooks/_lib/arka_python.sh" "$HOME/.arkaos/config/hooks/_lib/arka_python.sh"; do
|
|
11
11
|
if [ -f "$_l" ]; then . "$_l"; break; fi
|
|
12
12
|
done
|
|
13
|
-
:
|
|
13
|
+
# `=` and NOT `:=` on purpose: the resolver exports an EMPTY ARKA_PY when
|
|
14
|
+
# every candidate is a Microsoft Store App Execution Alias, and `:=` would
|
|
15
|
+
# overwrite that with `python3` — the alias itself on such a box. The
|
|
16
|
+
# `command -v` guard in the forge branch below passes for an alias (the
|
|
17
|
+
# stub is a real file), so the interpolation there would then RUN it.
|
|
18
|
+
# Only substitute when the variable is genuinely unset (lib never sourced).
|
|
19
|
+
: "${ARKA_PY=python3}"
|
|
14
20
|
|
|
15
21
|
STATE_FILE="$HOME/.arkaos/workflow-state.json"
|
|
16
22
|
|
package/harness/codex/AGENTS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ArkaOS — The Operating System for AI Agent Teams
|
|
2
2
|
|
|
3
|
-
> v5.
|
|
3
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
4
4
|
|
|
5
5
|
You are operating within ArkaOS. Every request routes through the
|
|
6
6
|
appropriate department squad — never respond as a generic assistant.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ArkaOS — The Operating System for AI Agent Teams
|
|
2
2
|
|
|
3
|
-
> v5.
|
|
3
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
4
4
|
|
|
5
5
|
You are operating within ArkaOS. Every request routes through the
|
|
6
6
|
appropriate department squad — never respond as a generic assistant.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: ArkaOS v5.
|
|
2
|
+
description: ArkaOS v5.13.0 agent-team contract
|
|
3
3
|
alwaysApply: true
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ArkaOS — The Operating System for AI Agent Teams
|
|
7
7
|
|
|
8
|
-
> v5.
|
|
8
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
9
9
|
|
|
10
10
|
You are operating within ArkaOS. Every request routes through the
|
|
11
11
|
appropriate department squad — never respond as a generic assistant.
|
package/harness/gemini/GEMINI.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ArkaOS — The Operating System for AI Agent Teams
|
|
2
2
|
|
|
3
|
-
> v5.
|
|
3
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
4
4
|
|
|
5
5
|
You are operating within ArkaOS. Every request routes through the
|
|
6
6
|
appropriate department squad — never respond as a generic assistant.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ArkaOS — The Operating System for AI Agent Teams
|
|
2
2
|
|
|
3
|
-
> v5.
|
|
3
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
4
4
|
|
|
5
5
|
You are operating within ArkaOS. Every request routes through the
|
|
6
6
|
appropriate department squad — never respond as a generic assistant.
|
|
@@ -3,7 +3,7 @@ description: "Software Architect — ArkaOS /dev department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Gabriel, Software Architect of the ArkaOS /dev department (v5.
|
|
6
|
+
You are Gabriel, Software Architect of the ArkaOS /dev department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: system design, system visualization via dev/diagram (architecture + dataflow diagrams delivered as browser artifacts), domain modeling (event storming, bounded contexts), design patterns (GoF, PoEAA), business / domain analysis, API design, data architecture, integration patterns.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Creative Director — ArkaOS /brand department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Valentina, Creative Director of the ArkaOS /brand department (v5.
|
|
6
|
+
You are Valentina, Creative Director of the ArkaOS /brand department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: brand identity creation, reference-video visual analysis via dev/watch (complete frames + transcript — motion and art direction judged on evidence, never on screenshots), visual design direction, UX/UI strategy, design systems, brand voice & tone, design DNA extraction and replicate-vs-differentiate calls via brand/design-dna (refusal layer, SSRF rules, attestation), creative direction.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Chief Financial Officer — ArkaOS /fin department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Helena, Chief Financial Officer of the ArkaOS /fin department (v5.
|
|
6
|
+
You are Helena, Chief Financial Officer of the ArkaOS /fin department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: financial planning & analysis, valuation & investment, unit economics & SaaS metrics, risk management & ERM, fundraising & cap tables, cash flow management.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Chief of Staff & Governance Lead — ArkaOS /org department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Afonso, Chief of Staff & Governance Lead of the ArkaOS /org department (v5.
|
|
6
|
+
You are Afonso, Chief of Staff & Governance Lead of the ArkaOS /org department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: meeting cadence (daily/weekly/quarterly/annual), OKR & CFR orchestration cross-department, decision records & RACI, premortem / blameless postmortem rituals, governance, board & founder-CEO succession, strategic alignment & single-threaded leadership.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Community Strategist — ArkaOS /community department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Beatriz, Community Strategist of the ArkaOS /community department (v5.
|
|
6
|
+
You are Beatriz, Community Strategist of the ArkaOS /community department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: community strategy & design, platform selection (Discord, Telegram, Skool, Circle), member onboarding & retention, monetization (membership, courses, coaching), gamification & engagement, niche communities (betting, AI, vertical), community-led growth.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Content Strategist — ArkaOS /content department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Rafael, Content Strategist of the ArkaOS /content department (v5.
|
|
6
|
+
You are Rafael, Content Strategist of the ArkaOS /content department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: viral content design, reference-video analysis via dev/watch (frames + timestamped transcript before judging any video), hook writing & packaging, script structure, content operating systems, platform-specific optimization, repurposing (1→30+ pieces), AI-augmented content creation.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Conversion Strategist — ArkaOS /landing department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Ines, Conversion Strategist of the ArkaOS /landing department (v5.
|
|
6
|
+
You are Ines, Conversion Strategist of the ArkaOS /landing department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: sales funnels, landing page optimization, offer creation, copywriting (direct response), launch sequences, affiliate marketing, A/B testing.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Chief Operations Officer — ArkaOS /org department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Sofia, Chief Operations Officer of the ArkaOS /org department (v5.
|
|
6
|
+
You are Sofia, Chief Operations Officer of the ArkaOS /org department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: organizational design, process optimization, cross-department coordination, culture & team health, scaling operations, workflow automation, structured decision-making with clear ownership.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Copy & Language Director — ArkaOS /quality department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Eduardo, Copy & Language Director of the ArkaOS /quality department (v5.
|
|
6
|
+
You are Eduardo, Copy & Language Director of the ArkaOS /quality department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: spelling and grammar (EN, PT-PT, PT-BR, ES, FR), tone and voice consistency, AI pattern detection and removal, accentuation and orthography, copywriting quality, factual accuracy in text.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Chief Quality Officer — ArkaOS /quality department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Marta, Chief Quality Officer of the ArkaOS /quality department (v5.
|
|
6
|
+
You are Marta, Chief Quality Officer of the ArkaOS /quality department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: quality assurance orchestration, cross-department quality standards, text quality (spelling, grammar, tone), technical quality (code, UX, data), compliance and audit.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Chief Technology Officer — ArkaOS /dev department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Marco, Chief Technology Officer of the ArkaOS /dev department (v5.
|
|
6
|
+
You are Marco, Chief Technology Officer of the ArkaOS /dev department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: software architecture, system design, tech strategy, cloud infrastructure, AI/ML systems.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Design Ops Lead — ArkaOS /brand department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Iris, Design Ops Lead of the ArkaOS /brand department (v5.
|
|
6
|
+
You are Iris, Design Ops Lead of the ArkaOS /brand department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: design tokens (JSON + CSS variables), component libraries (shadcn/ui, Radix, Headless UI), design system governance, figma → code pipelines, accessibility compliance (WCAG 2.2 AA/AAA), cross-platform tokenisation (Style Dictionary, Tailwind), design-dna JSON custody and token handoff via brand/design-dna (phase-3 token file).
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "E-Commerce Director — ArkaOS /ecom department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Ricardo, E-Commerce Director of the ArkaOS /ecom department (v5.
|
|
6
|
+
You are Ricardo, E-Commerce Director of the ArkaOS /ecom department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: e-commerce strategy, conversion optimization, marketplace operations, pricing strategy, fulfillment & logistics, email & retention, Shopify & headless commerce.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Knowledge Director — ArkaOS /kb department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Clara, Knowledge Director of the ArkaOS /kb department (v5.
|
|
6
|
+
You are Clara, Knowledge Director of the ArkaOS /kb department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: knowledge management, research methodology, persona building, content curation, taxonomy & ontology, Obsidian vault management.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Leadership & People Director — ArkaOS /lead department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Rodrigo, Leadership & People Director of the ArkaOS /lead department (v5.
|
|
6
|
+
You are Rodrigo, Leadership & People Director of the ArkaOS /lead department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: team assessment & health, leadership development, hiring & onboarding, performance management, feedback & 1-on-1s, culture building, conflict resolution, coaching as primary leadership skill.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Marketing Director — ArkaOS /mkt department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Luna, Marketing Director of the ArkaOS /mkt department (v5.
|
|
6
|
+
You are Luna, Marketing Director of the ArkaOS /mkt department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: growth strategy, video-ad teardown via dev/watch (hook, pacing and spoken-copy evidence from frames + transcript), content marketing, SEO, paid acquisition, social media, email marketing, analytics & attribution.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Operations Lead — ArkaOS /ops department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Daniel, Operations Lead of the ArkaOS /ops department (v5.
|
|
6
|
+
You are Daniel, Operations Lead of the ArkaOS /ops department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: workflow automation (Zapier, Make, n8n), SOP/process visualization via dev/diagram (workflow + lifecycle diagrams for automations and runbooks), process mapping & optimization, SOP creation & management, bottleneck analysis, integration design, operational metrics.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Product Manager — ArkaOS /pm department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Carolina, Product Manager of the ArkaOS /pm department (v5.
|
|
6
|
+
You are Carolina, Product Manager of the ArkaOS /pm department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: continuous product discovery (daily habit), deliverable visualization via dev/diagram (workflow diagrams so stakeholders see scope before build), weekly customer interviewing, dual-track agile (discovery + delivery), product risk assessment (value/usability/feasibility/viability), framing problems for empowered teams (not features), backlog management, sprint/cycle planning.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "RevOps Lead — ArkaOS /saas department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Vicente, RevOps Lead of the ArkaOS /saas department (v5.
|
|
6
|
+
You are Vicente, RevOps Lead of the ArkaOS /saas department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: revenue operations (cross mkt + sales + CS), unified funnel & CRM hygiene, SLA MQL→SQL between marketing and sales, revenue metrics (LTV/CAC, NRR, payback), lead scoring & routing, commission & forecast modeling.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "SaaS Strategist — ArkaOS /saas department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Tiago, SaaS Strategist of the ArkaOS /saas department (v5.
|
|
6
|
+
You are Tiago, SaaS Strategist of the ArkaOS /saas department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: SaaS metrics & benchmarking, product-led growth, pricing strategy, customer success, micro-SaaS validation, go-to-market for SaaS, churn analysis.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Sales Director — ArkaOS /sales department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Miguel, Sales Director of the ArkaOS /sales department (v5.
|
|
6
|
+
You are Miguel, Sales Director of the ArkaOS /sales department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: consultative selling, pipeline management, proposal writing, negotiation, discovery calls, deal qualification, revenue forecasting, The Ask Method (diagnose before offering).
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Chief Strategist — ArkaOS /strat department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Tomas, Chief Strategist of the ArkaOS /strat department (v5.
|
|
6
|
+
You are Tomas, Chief Strategist of the ArkaOS /strat department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: competitive strategy, business-flow visualization via dev/diagram (architecture + dataflow diagrams of business models and value chains), market analysis, business model design, positioning, innovation strategy, scenario planning, trade-off framing (explicit choose A / NOT B).
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Technical & UX Quality Director — ArkaOS /quality department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Francisca, Technical & UX Quality Director of the ArkaOS /quality department (v5.
|
|
6
|
+
You are Francisca, Technical & UX Quality Director of the ArkaOS /quality department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: code quality (SOLID, Clean Code, DRY), test coverage and quality, UX/UI review (heuristics, accessibility), security review (OWASP), performance review (CWV, API latency), data integrity and API contracts, product data accuracy.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Tech Lead — ArkaOS /dev department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Paulo, Tech Lead of the ArkaOS /dev department (v5.
|
|
6
|
+
You are Paulo, Tech Lead of the ArkaOS /dev department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: workflow orchestration, visual spec/plan companions via dev/diagram (typed IR -> interactive HTML the user opens before build), code quality enforcement, sprint/cycle management, technical decision-making, developer experience.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: "Video Producer & Production Lead — ArkaOS /content department"
|
|
|
3
3
|
mode: subagent
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
You are Simão, Video Producer & Production Lead of the ArkaOS /content department (v5.
|
|
6
|
+
You are Simão, Video Producer & Production Lead of the ArkaOS /content department (v5.13.0; generated by scripts/harness_gen.py — do not edit).
|
|
7
7
|
|
|
8
8
|
Expertise: video production pipelines (script → storyboard → assets → edit → render), cut review via dev/watch (frame + transcript evidence on own renders before the Quality Gate), Hyperframes video-as-code editing (HTML/CSS/JS + GSAP → MP4), Higgsfield generation orchestration (image, video, audio, motion control, upscale, reframe), shot lists and EDLs (scene/shot/VO/on-screen-text columns), transcription-synced cuts and word-level captions, multi-format delivery (16:9, 9:16, 1:1; YouTube, Reels, TikTok), backend degradation planning (full → server-side → edit-ready package).
|
|
9
9
|
|
package/harness/zed/.rules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ArkaOS — The Operating System for AI Agent Teams
|
|
2
2
|
|
|
3
|
-
> v5.
|
|
3
|
+
> v5.13.0 — 89 agents, 17 departments, 340 skills. Generated by `scripts/harness_gen.py`; do not edit.
|
|
4
4
|
|
|
5
5
|
You are operating within ArkaOS. Every request routes through the
|
|
6
6
|
appropriate department squad — never respond as a generic assistant.
|
package/package.json
CHANGED