arkaos 4.3.3 → 4.3.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 4.3.3
1
+ 4.3.4
@@ -2,9 +2,10 @@ name: forge-integration
2
2
  added_in: "2.14.0"
3
3
  mandatory: true
4
4
  section_title: "Forge Integration"
5
- detection_pattern: "arka-forge"
5
+ detection_pattern: "arka:feature:forge-integration|## Forge Integration|arka-forge"
6
6
  deprecated_in: null
7
7
  content: |
8
+ <!-- arka:feature:forge-integration:start -->
8
9
  ## Forge Integration
9
10
 
10
11
  Complex requests (complexity score >= 5) are automatically routed to
@@ -14,3 +15,4 @@ content: |
14
15
  - Complexity assessment: automatic via Synapse L8 (ForgeContextLayer)
15
16
  - Manual invocation: `/forge` command
16
17
  - Handoff: Forge outputs structured plan → squad executes phases
18
+ <!-- arka:feature:forge-integration:end -->
@@ -2,9 +2,10 @@ name: quality-gate
2
2
  added_in: "2.10.0"
3
3
  mandatory: true
4
4
  section_title: "Quality Gate"
5
- detection_pattern: "Marta.*CQO|Quality Gate"
5
+ detection_pattern: "arka:feature:quality-gate|## Quality Gate"
6
6
  deprecated_in: null
7
7
  content: |
8
+ <!-- arka:feature:quality-gate:start -->
8
9
  ## Quality Gate
9
10
 
10
11
  Mandatory on every workflow. Nothing ships without approval.
@@ -13,3 +14,4 @@ content: |
13
14
  - **Eduardo (Copy Director):** Reviews all text output
14
15
  - **Francisca (Tech Director):** Reviews all code and technical output
15
16
  - Verdict: APPROVED or REJECTED (binary, no partial)
17
+ <!-- arka:feature:quality-gate:end -->
@@ -2,9 +2,10 @@ name: spec-driven-gate
2
2
  added_in: "2.13.0"
3
3
  mandatory: true
4
4
  section_title: "Spec-Driven Development"
5
- detection_pattern: "arka-spec"
5
+ detection_pattern: "arka:feature:spec-driven-gate|## Spec-Driven Development|arka-spec"
6
6
  deprecated_in: null
7
7
  content: |
8
+ <!-- arka:feature:spec-driven-gate:start -->
8
9
  ## Spec-Driven Development
9
10
 
10
11
  Phase 0 of all workflows. No implementation begins without a validated spec.
@@ -13,3 +14,4 @@ content: |
13
14
  - Gate: spec must be approved before planning phase starts
14
15
  - Storage: `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
15
16
  - Review: user approval required on written spec
17
+ <!-- arka:feature:spec-driven-gate:end -->
@@ -2,9 +2,10 @@ name: workflow-tiers
2
2
  added_in: "2.12.0"
3
3
  mandatory: true
4
4
  section_title: "Workflow Tiers"
5
- detection_pattern: "Enterprise.*phase|Focused.*phase|Specialist.*phase"
5
+ detection_pattern: "arka:feature:workflow-tiers|## Workflow Tiers"
6
6
  deprecated_in: null
7
7
  content: |
8
+ <!-- arka:feature:workflow-tiers:start -->
8
9
  ## Workflow Tiers
9
10
 
10
11
  Three workflow tiers based on task complexity:
@@ -17,3 +18,4 @@ content: |
17
18
 
18
19
  Tier selection is automatic based on complexity assessment.
19
20
  Quality Gate phase is mandatory on ALL tiers.
21
+ <!-- arka:feature:workflow-tiers:end -->
@@ -74,9 +74,11 @@ Returns JSON report for downstream consumption.
74
74
  ## Feature Registry
75
75
 
76
76
  YAML files under `core/sync/features/*.yaml` (or `~/.arkaos/config/sync/features/*.yaml`). Each feature has:
77
- - `detection_pattern` — regex/string searched in ecosystem SKILL.md to decide if the feature is already present
78
- - `content` — the section to inject if missing
79
- - `deprecated_in` — if set, the matching section is removed
77
+ - `detection_pattern` — regex searched in ecosystem SKILL.md to decide if the feature is already present. Matches any of: the `arka:feature:<name>` marker, the bare `## <section_title>` heading (legacy/customized sections), or — only where a token is unique enough to never appear in unrelated prose (e.g. `arka-forge`) — a historical keyword
78
+ - `content` — the section to inject if missing, wrapped in `<!-- arka:feature:<name>:start -->` / `<!-- arka:feature:<name>:end -->` markers so future runs detect it and deprecation can remove it precisely
79
+ - `deprecated_in` — if set, the matching section is removed (marker pair preferred; fall back to the `## <section_title>` heading block)
80
+
81
+ The registry is self-detecting by contract: `detection_pattern` MUST match the feature's own `content` (locked by `tests/python/test_sync_features_registry.py`), otherwise every naive sync re-injects a duplicate section.
80
82
 
81
83
  ## Key Paths
82
84
 
@@ -47,10 +47,10 @@ After the Python engine completes, dispatch ONE subagent.
47
47
  **Subagent task — for each `~/.claude/skills/arka-{ecosystem}/SKILL.md`:**
48
48
  1. Read the SKILL.md.
49
49
  2. For each feature YAML where `deprecated_in` is null:
50
- - Search SKILL.md for `detection_pattern`.
51
- - If NOT found: inject `content` after the last existing feature section, or after the "Commands" table if no feature sections exist (before "Orchestration Workflows").
50
+ - Apply the `detection_pattern` regex to the SKILL.md text. It matches the `arka:feature:<name>` marker, the bare `## <section_title>` heading, or a unique historical keyword — a customized section without markers still counts as present and MUST NOT be duplicated.
51
+ - If NOT found: inject `content` (already marker-wrapped) after the last existing feature section, or after the "Commands" table if no feature sections exist (before "Orchestration Workflows").
52
52
  3. For each feature where `deprecated_in` is set:
53
- - Locate and remove the matching section.
53
+ - Remove the `<!-- arka:feature:<name>:start -->` … `:end -->` block when markers exist; otherwise remove the `## <section_title>` section.
54
54
  4. PRESERVE all custom content: commands, architecture, tech stack, business descriptions, ecosystem-specific workflow details.
55
55
 
56
56
  ### Report
@@ -0,0 +1,25 @@
1
+ import { existsSync, cpSync, chmodSync, readdirSync, mkdirSync } from "node:fs";
2
+ import { join } from "node:path";
3
+
4
+ // Deploys config/hooks/_lib/ (shared hook libraries — the Python
5
+ // interpreter resolver lives here) into an install's hooks directory.
6
+ // Single implementation shared by the fresh-install path
7
+ // (index.js::installHooks) and the update path (update.js): the v4.3.2
8
+ // regression existed precisely because the two deploy loops drifted.
9
+ // Returns true when the lib dir was copied, false when the source has
10
+ // no _lib/ to deploy.
11
+ export function copyHookLib(srcHooksDir, destHooksDir) {
12
+ const srcLibDir = join(srcHooksDir, "_lib");
13
+ if (!existsSync(srcLibDir)) return false;
14
+ const destLibDir = join(destHooksDir, "_lib");
15
+ mkdirSync(destLibDir, { recursive: true });
16
+ cpSync(srcLibDir, destLibDir, { recursive: true });
17
+ // chmod is a no-op on Windows (NTFS ACLs aren't POSIX); the try/catch
18
+ // keeps the copy result authoritative even if it throws.
19
+ try {
20
+ for (const f of readdirSync(destLibDir)) {
21
+ if (f.endsWith(".sh")) chmodSync(join(destLibDir, f), 0o755);
22
+ }
23
+ } catch {}
24
+ return true;
25
+ }
@@ -6,6 +6,7 @@ import { fileURLToPath } from "node:url";
6
6
  import { getRuntimeConfig } from "./detect-runtime.js";
7
7
  import { findSystemPython, ensureVenv, getArkaosPython, getArkaosPip, pipInstall } from "./python-resolver.js";
8
8
  import { IS_WINDOWS, HOOK_EXT } from "./platform.js";
9
+ import { copyHookLib } from "./hook-lib.js";
9
10
 
10
11
  const __filename = fileURLToPath(import.meta.url);
11
12
  const __dirname = dirname(__filename);
@@ -665,16 +666,7 @@ function installHooks(installDir) {
665
666
  }
666
667
  }
667
668
 
668
- const srcLibDir = join(srcHooksDir, "_lib");
669
- if (existsSync(srcLibDir)) {
670
- const destLibDir = join(hooksDir, "_lib");
671
- ensureDir(destLibDir);
672
- cpSync(srcLibDir, destLibDir, { recursive: true });
673
- try {
674
- for (const f of readdirSync(destLibDir)) {
675
- if (f.endsWith(".sh")) chmodSync(join(destLibDir, f), 0o755);
676
- }
677
- } catch {}
669
+ if (copyHookLib(srcHooksDir, hooksDir)) {
678
670
  ok("Hook lib: _lib/");
679
671
  }
680
672
  }
@@ -3,6 +3,7 @@ import { join, dirname, resolve } from "node:path";
3
3
  import { homedir } from "node:os";
4
4
  import { execSync } from "node:child_process";
5
5
  import { ensureVenv, ensureVenvHealthy, getArkaosPython, pipInstall } from "./python-resolver.js";
6
+ import { copyHookLib } from "./hook-lib.js";
6
7
  import { getRuntimeConfig } from "./detect-runtime.js";
7
8
  import { loadAdapter } from "./index.js";
8
9
  import { migrateUserData, printMigrationReport } from "./migrate-user-data.js";
@@ -218,20 +219,10 @@ export async function update() {
218
219
  console.log(" ✓ Hook scripts updated");
219
220
 
220
221
  // Shared hook libraries (config/hooks/_lib/ — the Python interpreter
221
- // resolver lives here). Keep in lockstep with index.js::installHooks:
222
- // the hooks deployed above source _lib/arka_python.sh from the install
223
- // dir, so skipping this copy leaves them falling back to a bare
224
- // `python3` without ArkaOS deps.
225
- const srcLibDir = join(srcHooksDir, "_lib");
226
- if (existsSync(srcLibDir)) {
227
- const destLibDir = join(destHooksDir, "_lib");
228
- mkdirSync(destLibDir, { recursive: true });
229
- cpSync(srcLibDir, destLibDir, { recursive: true });
230
- try {
231
- for (const f of readdirSync(destLibDir)) {
232
- if (f.endsWith(".sh")) chmodSync(join(destLibDir, f), 0o755);
233
- }
234
- } catch {}
222
+ // resolver lives here). The hooks deployed above source
223
+ // _lib/arka_python.sh from the install dir, so skipping this copy
224
+ // leaves them falling back to a bare `python3` without ArkaOS deps.
225
+ if (copyHookLib(srcHooksDir, destHooksDir)) {
235
226
  console.log(" ✓ Hook lib updated (_lib/)");
236
227
  }
237
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "4.3.3",
3
+ "version": "4.3.4",
4
4
  "description": "The Operating System for AI Agent Teams",
5
5
  "type": "module",
6
6
  "bin": {
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "arkaos-core"
3
- version = "4.3.3"
3
+ version = "4.3.4"
4
4
  description = "Core engine for ArkaOS — The Operating System for AI Agent Teams"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}