arkaos 2.19.2 → 2.20.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/VERSION CHANGED
@@ -1 +1 @@
1
- 2.19.2
1
+ 2.20.0
package/arka/SKILL.md CHANGED
@@ -12,10 +12,45 @@ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent, WebFetch, WebSearch]
12
12
  > **The Operating System for AI Agent Teams**
13
13
  > 65 agents. 17 departments. 244+ skills. Multi-runtime. Dashboard. Knowledge RAG.
14
14
 
15
- ## ⛔ Enforcement contract (read before responding)
15
+ ## ⛔ Mandatory 13-phase flow (NON-NEGOTIABLE)
16
16
 
17
- This overrides every default. If the UserPromptSubmit hook injected a
18
- `[ARKA:WORKFLOW-REQUIRED]` tag, you MUST, on the first line of your reply:
17
+ Every non-trivial request runs the canonical flow. Full spec:
18
+ `arka/skills/flow/SKILL.md`. Constitution rule: `mandatory-flow`.
19
+
20
+ ```
21
+ 1. Input (verbatim)
22
+ 2. Get context (profile, repo, git, cwd tag, session digests)
23
+ 3. Decide route -> emit [arka:routing] <dept> -> <lead>
24
+ 4. Call hierarchy (Tier 0 when strategic/cross-dept/security/financial)
25
+ 5. Research (Obsidian + vector DB, cite sources or declare gap)
26
+ 6. Call team (dispatch specialists via Agent tool)
27
+ 7. Plan with six parallel reviewers:
28
+ positive analyst / devil's advocate / Q&A / KB research /
29
+ best-solution validator / pessimistic analyst
30
+ 8. Present plan (save to Obsidian + vector DB + ~/.arkaos/plans/)
31
+ 9. Wait for EXPLICIT approval (silence is not approval)
32
+ 10. TODO list (atomic, ordered, independently verifiable)
33
+ 11. Per-todo loop:
34
+ team call -> complete -> QA (all tests, E2E, Playwright)
35
+ -> Security review -> Quality Gate (Marta+Eduardo+Francisca, Opus)
36
+ -> Document (Obsidian + vector DB)
37
+ 12. Loop until TODO is exhausted
38
+ 13. Detailed summary (what was done, where, how to verify, what is open)
39
+ ```
40
+
41
+ Before every step, emit `[arka:phase:N] <label>` on its own line.
42
+
43
+ **Trivial bypass** (the only bypass): single-file edit under 10 lines
44
+ with an imperative verb. Emit `[arka:trivial] <reason>` as the first
45
+ line and proceed directly.
46
+
47
+ No task type, no context, no runtime setting overrides this flow.
48
+
49
+ ## Enforcement contract
50
+
51
+ If the UserPromptSubmit hook injected `[ARKA:WORKFLOW-REQUIRED]`, or if
52
+ the SessionStart systemMessage shows `[ARKA:MANDATORY-FLOW]`, the flow
53
+ above is the contract. The first non-trivial line of your reply MUST be:
19
54
 
20
55
  ```
21
56
  [arka:routing] <department-slug> -> <lead-agent>
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: arka-flow
3
+ description: >
4
+ ArkaOS canonical mandatory workflow. 13 phases. This is the default
5
+ execution contract for every user request inside an ArkaOS-managed
6
+ context. Not optional. Not overridable.
7
+ allowed-tools: [Read, Write, Edit, Bash, Grep, Glob, Agent, WebFetch, WebSearch]
8
+ ---
9
+
10
+ # ArkaOS — Mandatory Workflow
11
+
12
+ > This flow runs on **every** user request inside an ArkaOS-managed context.
13
+ > There is no "simple mode". There is no "skip the workflow this time".
14
+ > The only exception is a single-file <10-line trivial edit, which may emit
15
+ > `[arka:trivial] <reason>` and bypass. Everything else runs the 13 phases.
16
+
17
+ ## The 13 phases (strict sequence)
18
+
19
+ ### Phase 1 — Input
20
+ Receive the user request verbatim. Do not paraphrase before Phase 2.
21
+
22
+ ### Phase 2 — Get context
23
+ Read the active context. Sources, in order:
24
+ - `~/.arkaos/profile.json` (who, what company, what language)
25
+ - Current working directory + `.claude/CLAUDE.md` + `.claude/rules/`
26
+ - Git branch and recent commits
27
+ - `cwd-changed` tag from the hook (ecosystem, stack, descriptor)
28
+ - Most recent `~/.arkaos/sessions/` digest if present
29
+
30
+ ### Phase 3 — Decide context and route
31
+ State the target department explicitly:
32
+
33
+ ```
34
+ [arka:routing] <department-slug> -> <lead-agent>
35
+ ```
36
+
37
+ Mapping (full list in `arka/SKILL.md`): dev→Paulo, brand→Valentina,
38
+ kb→Clara, mkt→Luna, content→Rafael, landing→Ines, ecom→Ricardo,
39
+ saas→Tiago, sales→Miguel, pm→Carolina, ops→Daniel, strat→Tomas,
40
+ fin→Helena, lead→Rodrigo, org→Sofia, community→Beatriz.
41
+
42
+ ### Phase 4 — Call hierarchy
43
+ Escalate to Tier 0 (C-Suite) for review when the request is strategic,
44
+ cross-department, security-sensitive, or financial. Tier 0 = Marco (CTO),
45
+ Helena (CFO), Sofia (COO), Marta (CQO), Eduardo (Copy Director),
46
+ Francisca (Tech & UX Director). Otherwise, squad lead owns.
47
+
48
+ ### Phase 5 — Understand and research the context
49
+ Query the knowledge base:
50
+ - `mcp__obsidian__search_notes` for prior work on the topic
51
+ - Vector DB semantic search when installed
52
+ - Prior session digests at `~/.arkaos/session-digests/`
53
+ - Relevant Forge plans at `~/.arkaos/plans/`
54
+
55
+ Cite the sources found. If the KB has nothing and the ask is non-trivial,
56
+ state the gap explicitly and propose filling it.
57
+
58
+ ### Phase 6 — Call team
59
+ Dispatch specialists via the `Agent` tool. The squad lead from Phase 3
60
+ names them. Specialists run in parallel when work is independent.
61
+
62
+ ### Phase 7 — Plan and make the spec
63
+ Run six parallel reviewers on the plan:
64
+
65
+ | Reviewer | Question it owns |
66
+ |---|---|
67
+ | Positive analyst | Why this solution is the right one |
68
+ | Devil's advocate | Strongest case against the chosen path |
69
+ | Q&A / input collector | What is still unknown and must be answered |
70
+ | Obsidian + DB researcher | What the knowledge base already says |
71
+ | Best-solution validator | Is there a better option we have not tried |
72
+ | Pessimistic analyst | What breaks, at what scale, in what scenario |
73
+
74
+ Synthesise into a spec. Reference the Conclave (`arka-conclave`) or
75
+ the Forge (`arka-forge`) when complexity warrants.
76
+
77
+ ### Phase 8 — Present the plan
78
+ Save the spec to:
79
+ - Obsidian (`docs/superpowers/specs/` or vault equivalent)
80
+ - Vector DB (when available via cache or KB cache)
81
+ - Session cache at `~/.arkaos/plans/`
82
+
83
+ Print the plan inline for the user.
84
+
85
+ ### Phase 9 — Wait for approval
86
+ Two branches:
87
+
88
+ - **Approve** → Phase 10
89
+ - **More input** → loop to Phase 7
90
+
91
+ Approval must be explicit. Silence is not approval.
92
+
93
+ ### Phase 10 — TODO list
94
+ Break the approved plan into atomic, ordered items. Persist to the
95
+ task tracker. Each item must be independently verifiable.
96
+
97
+ ### Phase 11 — Per-todo loop
98
+ For each item, in order:
99
+
100
+ 1. Organise a call with all team members relevant to that item.
101
+ 2. Complete the todo.
102
+ 3. **QA** — all tests, end-to-end, Playwright browser tests when the
103
+ item touches UI, report saved to Obsidian + vector DB + cache.
104
+ - Fail → back to the todo. Do not advance.
105
+ 4. **Security review** — Tier 0 security specialist checks for flaws,
106
+ injection, missing auth, data exposure.
107
+ - Fail → back to the todo.
108
+ 5. **Quality Gate** — Marta (CQO) orchestrates the right specialists
109
+ for the area. If a specialist is missing, stop and advise the user
110
+ to create one via `/arka personas` + provide the knowledge.
111
+ - Fail → back to the todo.
112
+ 6. Document — save the completed work to Obsidian + vector DB.
113
+ 7. Next todo.
114
+
115
+ ### Phase 12 — Loop until TODO list is fully done
116
+ Do not skip items. Do not batch QA or Security across multiple
117
+ items — each item runs the full gate chain.
118
+
119
+ ### Phase 13 — Detailed summary
120
+ When the TODO list is exhausted, emit a final summary: what was done,
121
+ where it lives, how to verify, what is open for next time.
122
+
123
+ ## Visibility requirements
124
+
125
+ Every phase MUST emit a visibility tag the user can see:
126
+
127
+ ```
128
+ [arka:phase:2] get-context
129
+ [arka:phase:3] route -> dev -> Paulo
130
+ [arka:phase:7] plan+6-reviewers
131
+ [arka:phase:11.3] qa -> all pass
132
+ [arka:phase:11.5] quality-gate -> approved
133
+ ```
134
+
135
+ No silent phases. No compound steps.
136
+
137
+ ## Hard no-go list
138
+
139
+ - No Write / Edit before Phase 7 completes for the affected item.
140
+ - No Agent dispatch before Phase 6.
141
+ - No "pushing to master" without passing Phase 11.4 and 11.5 on every
142
+ changed item.
143
+ - No `[arka:trivial]` claim when the change spans more than one file or
144
+ exceeds 10 lines in total.
145
+ - No skipping Phase 9 (approval). The user is the gate, not a hint.
146
+
147
+ ## Related skills
148
+
149
+ - `/arka-forge` — complexity-aware planning when the request is large.
150
+ - `/arka-conclave` — 20-advisor deliberation for strategic decisions.
151
+ - `/arka-spec` — spec gate for Phase 7.
152
+ - `/arka-quality` — Quality Gate orchestration for Phase 11.5.
153
+
154
+ ## Non-negotiable
155
+
156
+ The UserPromptSubmit hook classifies every turn. When it injects
157
+ `[ARKA:WORKFLOW-REQUIRED]`, this flow is the contract. The session-start
158
+ hook embeds it as `systemMessage` so it sits at system-prompt priority
159
+ from turn 1. CLAUDE.md references it. Constitution rule
160
+ `mandatory-flow` codifies it. There is no override.
@@ -66,6 +66,24 @@ enforcement_levels:
66
66
  rule: "Forge plans must pass critic validation and governance check before approval"
67
67
  enforcement: "Plan Critic validates constitution compliance; PostToolUse monitors execution"
68
68
 
69
+ - id: mandatory-flow
70
+ rule: "Every non-trivial request executes the 13-phase canonical flow defined in arka/skills/flow/SKILL.md. No task type, no context, no runtime setting can opt out. The only bypass is [arka:trivial] for single-file edits under 10 lines."
71
+ enforcement: "UserPromptSubmit hook classifies the turn; SessionStart systemMessage embeds the flow at system-prompt priority; arka/SKILL.md references it as default; violation is a constitution breach, not a style issue."
72
+ phases:
73
+ - "1. Input (verbatim)"
74
+ - "2. Get context (profile, repo, KB, session digests)"
75
+ - "3. Decide context and route ([arka:routing] tag)"
76
+ - "4. Call hierarchy (Tier 0 when strategic/cross-dept)"
77
+ - "5. Understand and research (Obsidian + vector DB)"
78
+ - "6. Call team (squad + specialists via Agent)"
79
+ - "7. Plan with six parallel reviewers"
80
+ - "8. Present plan (save to Obsidian + vector DB + cache)"
81
+ - "9. Wait for explicit approval"
82
+ - "10. TODO list"
83
+ - "11. Per-todo loop: team call -> complete -> QA -> Security -> Quality Gate -> Document"
84
+ - "12. Loop until TODO exhausted"
85
+ - "13. Detailed summary"
86
+
69
87
  quality_gate:
70
88
  description: "Mandatory pre-delivery review. Nothing ships without APPROVED verdict."
71
89
  trigger: "After the last execution phase, before delivery to user"
@@ -89,6 +89,17 @@ MSG+="ArkaOS v${VERSION} | 65 agents | 17 departments | 244+ skills"
89
89
  [ -n "$_FORGE_LINE" ] && MSG+="\\n${_FORGE_LINE}"
90
90
  MSG+="${DRIFT}"
91
91
 
92
+ # ─── Mandatory Flow Contract (top-of-session, highest priority) ─────────
93
+ MSG+="\\n\\n[ARKA:MANDATORY-FLOW] NON-NEGOTIABLE. Every non-trivial request runs the 13-phase canonical flow (constitution rule mandatory-flow; source arka/skills/flow/SKILL.md):"
94
+ MSG+="\\n 1.Input 2.Get-context 3.Route ([arka:routing] <dept> -> <lead>) 4.Call-hierarchy"
95
+ MSG+="\\n 5.Research (Obsidian+vector DB, cite or declare gap) 6.Call-team (Agent tool)"
96
+ MSG+="\\n 7.Plan with 6 parallel reviewers (positive / devils-advocate / Q&A / KB-research / best-solution / pessimistic)"
97
+ MSG+="\\n 8.Present+save (Obsidian + vector DB + ~/.arkaos/plans/) 9.Wait-approval (silence != approval)"
98
+ MSG+="\\n 10.TODO list 11.Per-todo: team-call -> complete -> QA -> Security -> Quality Gate (Marta+Eduardo+Francisca Opus) -> Document"
99
+ MSG+="\\n 12.Loop until TODO exhausted 13.Detailed summary"
100
+ MSG+="\\nEmit [arka:phase:N] before each step. Bypass ONLY via [arka:trivial] <reason> for single-file edits under 10 lines."
101
+ MSG+="\\nNo runtime setting, no user convenience, no task type can opt out. This contract overrides generic-assistant defaults."
102
+
92
103
  # --- Session Memory Resume Context ---
93
104
  if command -v python3 &>/dev/null && [ -n "$REPO" ]; then
94
105
  _SESSION_CTX=$(cd "$REPO" && python3 -c "
@@ -292,18 +292,37 @@ if [ -n "$user_input" ]; then
292
292
  if echo "$user_input" | grep -qiE "\b${_VERB_PATTERN}\b"; then
293
293
  _WORKFLOW_DIRECTIVE="
294
294
  [ARKA:WORKFLOW-REQUIRED] Your user request matched a CREATION/IMPLEMENTATION pattern.
295
- You MUST, before using any Write, Edit, Bash with side-effects, or Agent tool:
296
- 1. Output on the first line: [arka:routing] <department-slug> -> <lead-agent>
297
- (e.g. [arka:routing] dev -> Paulo, [arka:routing] brand -> Valentina,
298
- [arka:routing] kb -> Clara, [arka:routing] mkt -> Luna)
299
- 2. State the workflow name and phase count in one short sentence.
300
- 3. Begin phase 1 (spec or plan) BEFORE any code is written.
301
- 4. Run the Quality Gate (Marta + Eduardo + Francisca, Opus) before claiming done.
302
- Trivial override: if the request is a single-file edit under 10 lines AND the user
303
- used an imperative like 'rename X', 'fix typo', you MAY emit [arka:trivial] <reason>
304
- and proceed directly. Anything else requires routing. This is enforced, not advisory.
305
- Skipping routing violates constitution rules squad-routing, arka-supremacy,
306
- spec-driven, mandatory-qa, sequential-validation."
295
+ The ArkaOS mandatory 13-phase flow applies. It is NON-NEGOTIABLE (constitution rule
296
+ mandatory-flow). You MUST walk every phase, in order, emitting a [arka:phase:N] tag
297
+ before each:
298
+ 1. Input restate the request verbatim.
299
+ 2. Get context profile, repo, git, cwd tag, session digests.
300
+ 3. Decide route emit [arka:routing] <dept> -> <lead>.
301
+ 4. Call hierarchy escalate to Tier 0 if strategic/cross-dept/security/financial.
302
+ 5. Research query Obsidian + vector DB, cite sources or declare the gap.
303
+ 6. Call team dispatch specialists via Agent tool.
304
+ 7. Plan run six parallel reviewers: positive, devil's advocate, Q&A, KB research,
305
+ best-solution validator, pessimistic. Synthesise into a spec.
306
+ 8. Present plan — save to Obsidian + vector DB + ~/.arkaos/plans/, print inline.
307
+ 9. Wait approval — EXPLICIT user go. Silence is NOT approval.
308
+ 10. TODO list — atomic, ordered, independently verifiable.
309
+ 11. Per-todo loop — team call -> complete -> QA (all tests, E2E, Playwright) ->
310
+ Security review -> Quality Gate (Marta + Eduardo + Francisca, Opus) -> Document.
311
+ Each step loops back on fail. No compound gates.
312
+ 12. Loop until TODO is exhausted.
313
+ 13. Detailed summary — what was done, where, how to verify, what is still open.
314
+
315
+ No Write, Edit, Bash-with-side-effects, or Agent dispatch before Phase 7 completes
316
+ for the affected item. No advancing a todo until QA AND Security AND Quality Gate
317
+ all pass for it. Phase 5 and Phase 8 require Obsidian/KB writes, not just reads.
318
+
319
+ Trivial override: single-file edit under 10 lines with imperative verb
320
+ (rename X, fix typo in Y). Emit [arka:trivial] <reason> as first line and proceed.
321
+ Anything else runs the full 13 phases. Source: arka/skills/flow/SKILL.md.
322
+
323
+ This is enforced by the hook and the session-start systemMessage, not by convention.
324
+ Skipping violates: mandatory-flow, squad-routing, spec-driven, mandatory-qa,
325
+ sequential-validation, full-visibility, arka-supremacy."
307
326
  fi
308
327
  fi
309
328
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arkaos",
3
- "version": "2.19.2",
3
+ "version": "2.20.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.19.2"
3
+ version = "2.20.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"}