arkaos 2.13.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/VERSION +1 -1
  2. package/arka/skills/forge/SKILL.md +649 -0
  3. package/config/constitution.yaml +8 -0
  4. package/config/hooks/post-tool-use.sh +43 -0
  5. package/config/hooks/session-start.sh +24 -0
  6. package/config/hooks/user-prompt-submit.sh +25 -1
  7. package/core/forge/__init__.py +104 -0
  8. package/core/forge/__pycache__/__init__.cpython-313.pyc +0 -0
  9. package/core/forge/__pycache__/complexity.cpython-313.pyc +0 -0
  10. package/core/forge/__pycache__/handoff.cpython-313.pyc +0 -0
  11. package/core/forge/__pycache__/persistence.cpython-313.pyc +0 -0
  12. package/core/forge/__pycache__/renderer.cpython-313.pyc +0 -0
  13. package/core/forge/__pycache__/schema.cpython-313.pyc +0 -0
  14. package/core/forge/complexity.py +125 -0
  15. package/core/forge/handoff.py +100 -0
  16. package/core/forge/persistence.py +308 -0
  17. package/core/forge/renderer.py +261 -0
  18. package/core/forge/schema.py +213 -0
  19. package/core/synapse/__init__.py +2 -2
  20. package/core/synapse/__pycache__/__init__.cpython-313.pyc +0 -0
  21. package/core/synapse/__pycache__/engine.cpython-313.pyc +0 -0
  22. package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
  23. package/core/synapse/engine.py +4 -2
  24. package/core/synapse/layers.py +49 -0
  25. package/core/sync/__init__.py +25 -0
  26. package/core/sync/__pycache__/__init__.cpython-313.pyc +0 -0
  27. package/core/sync/__pycache__/descriptor_syncer.cpython-313.pyc +0 -0
  28. package/core/sync/__pycache__/discovery.cpython-313.pyc +0 -0
  29. package/core/sync/__pycache__/engine.cpython-313.pyc +0 -0
  30. package/core/sync/__pycache__/manifest.cpython-313.pyc +0 -0
  31. package/core/sync/__pycache__/mcp_syncer.cpython-313.pyc +0 -0
  32. package/core/sync/__pycache__/reporter.cpython-313.pyc +0 -0
  33. package/core/sync/__pycache__/schema.cpython-313.pyc +0 -0
  34. package/core/sync/__pycache__/settings_syncer.cpython-313.pyc +0 -0
  35. package/core/sync/descriptor_syncer.py +166 -0
  36. package/core/sync/discovery.py +256 -0
  37. package/core/sync/engine.py +177 -0
  38. package/core/sync/features/forge.yaml +16 -0
  39. package/core/sync/features/quality-gate.yaml +15 -0
  40. package/core/sync/features/spec-gate.yaml +15 -0
  41. package/core/sync/features/workflow-tiers.yaml +19 -0
  42. package/core/sync/manifest.py +87 -0
  43. package/core/sync/mcp_syncer.py +255 -0
  44. package/core/sync/reporter.py +178 -0
  45. package/core/sync/schema.py +94 -0
  46. package/core/sync/settings_syncer.py +121 -0
  47. package/core/workflow/state_reader.sh +25 -1
  48. package/departments/ops/skills/update/SKILL.md +69 -0
  49. package/installer/update.js +14 -0
  50. package/package.json +1 -1
  51. package/pyproject.toml +1 -1
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: arka-update
3
+ description: ArkaOS project sync orchestrator. Detects what changed in core since last sync and updates all ecosystem skills, MCPs, settings, and project descriptors.
4
+ ---
5
+
6
+ # /arka update — Project Sync Engine
7
+
8
+ Hybrid sync engine: Python handles deterministic operations (MCPs, settings, descriptors), AI handles intelligent operations (ecosystem skill text updates).
9
+
10
+ ## Usage
11
+
12
+ ```
13
+ /arka update
14
+ ```
15
+
16
+ ## How It Works
17
+
18
+ ### Phase 1-3 + 5: Deterministic Sync (Python)
19
+
20
+ Run the sync engine:
21
+ ```bash
22
+ cd $ARKAOS_ROOT && python -m core.sync.engine --home ~/.arkaos --skills ~/.claude/skills --output json
23
+ ```
24
+
25
+ The engine:
26
+ 1. **Phase 1 (Manifest):** Reads sync-state.json, compares versions, loads feature registry
27
+ 2. **Phase 2 (Discovery):** Finds all projects from 3 sources (descriptors, filesystem, ecosystems)
28
+ 3. **Phase 3a (MCP Sync):** Updates .mcp.json per project based on registry + stack
29
+ 4. **Phase 3b (Settings Sync):** Aligns settings.local.json with .mcp.json
30
+ 5. **Phase 3c (Descriptors):** Auto-pause inactive, archive missing, update stacks
31
+ 6. **Phase 5 (State):** Writes sync-state.json and returns JSON report
32
+
33
+ ### Phase 4: Intelligent Sync (AI Subagent)
34
+
35
+ After the Python engine completes, dispatch ONE subagent to update ecosystem skills:
36
+
37
+ **Subagent input:**
38
+ - The JSON report from the engine (which ecosystems exist)
39
+ - The feature registry files from `core/sync/features/*.yaml` (or `~/.arkaos/config/sync/features/*.yaml`)
40
+
41
+ **Subagent task:**
42
+ For each ecosystem skill (`~/.claude/skills/arka-{ecosystem}/SKILL.md`):
43
+ 1. Read the SKILL.md
44
+ 2. For each feature YAML where `deprecated_in` is null:
45
+ - Search SKILL.md for `detection_pattern`
46
+ - If NOT found → inject `content` after the last existing feature section, or after the "Commands" table if no feature sections exist yet (before "Orchestration Workflows" section)
47
+ 3. For each feature where `deprecated_in` is set:
48
+ - Search for and remove the section
49
+ 4. PRESERVE all custom content: commands, architecture, tech stack, business descriptions
50
+
51
+ ### Report
52
+
53
+ Display the formatted report from the engine output. The engine's text output format:
54
+ ```
55
+ ═══════════════════════════════════════════════════════
56
+ ArkaOS Sync Complete — v2.14.0 → v2.15.0
57
+ ═══════════════════════════════════════════════════════
58
+ MCPs: 22 synced (8 updated, 14 unchanged)
59
+ Settings: 22 synced (8 updated, 14 unchanged)
60
+ Descriptors: 5 synced (1 updated, 4 unchanged)
61
+ Skills: 3 ecosystems synced (2 updated, 1 unchanged)
62
+ ...
63
+ ```
64
+
65
+ ## Error Handling
66
+
67
+ - If Python engine fails: report the error, do not proceed to AI phase
68
+ - If AI subagent fails: deterministic sync already completed, report partial success
69
+ - Individual project errors don't stop other projects from syncing
@@ -380,6 +380,20 @@ export async function update() {
380
380
  console.log(" ✓ MCP infrastructure updated (profiles, stacks, scripts, arka-prompts server)");
381
381
  }
382
382
 
383
+ // ── 6b. Copy feature registry for sync engine ──
384
+ const featuresSource = join(ARKAOS_ROOT, 'core', 'sync', 'features');
385
+ const featuresDest = join(installDir, 'config', 'sync', 'features');
386
+ if (existsSync(featuresSource)) {
387
+ mkdirSync(featuresDest, { recursive: true });
388
+ const featureFiles = readdirSync(featuresSource).filter(f => f.endsWith('.yaml'));
389
+ for (const file of featureFiles) {
390
+ copyFileSync(join(featuresSource, file), join(featuresDest, file));
391
+ }
392
+ if (featureFiles.length > 0) {
393
+ console.log(` ✓ Feature registry: ${featureFiles.length} features copied`);
394
+ }
395
+ }
396
+
383
397
  // ── 7. Update .repo-path + .arkaos-root ──
384
398
  // Two references point at the source repo. Both MUST be updated on
385
399
  // every update pass, otherwise running `npx arkaos update` from a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
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 = "2.10.1"
3
+ version = "2.15.0"
4
4
  description = "Core engine for ArkaOS — The Operating System for AI Agent Teams"
5
5
  readme = "README.md"
6
6
  license = {text = "MIT"}