arkaos 4.0.2 → 4.1.1

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 (214) hide show
  1. package/README.md +2 -2
  2. package/VERSION +1 -1
  3. package/arka/SKILL.md +16 -22
  4. package/arka/skills/flow/SKILL.md +108 -234
  5. package/config/claude-agents/eduardo-copy.md +53 -0
  6. package/config/claude-agents/francisca-tech.md +52 -0
  7. package/config/claude-agents/marta-cqo.md +52 -0
  8. package/config/claude-agents/paulo-tech-lead.md +50 -0
  9. package/config/cognition/schedules.yaml +15 -0
  10. package/config/constitution.yaml +17 -21
  11. package/config/hooks/_lib/workflow-classifier.sh +1 -1
  12. package/config/hooks/post-tool-use.sh +52 -536
  13. package/config/hooks/pre-tool-use.sh +46 -280
  14. package/config/hooks/session-start.sh +8 -10
  15. package/config/hooks/stop.sh +44 -424
  16. package/config/hooks/user-prompt-submit.sh +55 -457
  17. package/core/__pycache__/__init__.cpython-314.pyc +0 -0
  18. package/core/cognition/__pycache__/dreaming.cpython-313.pyc +0 -0
  19. package/core/cognition/dreaming.py +5 -0
  20. package/core/cognition/scheduler/__pycache__/daemon.cpython-313.pyc +0 -0
  21. package/core/cognition/scheduler/daemon.py +10 -0
  22. package/core/forge/__init__.py +2 -0
  23. package/core/forge/__pycache__/__init__.cpython-313.pyc +0 -0
  24. package/core/forge/__pycache__/orchestrator.cpython-313.pyc +0 -0
  25. package/core/forge/__pycache__/persistence.cpython-313.pyc +0 -0
  26. package/core/forge/__pycache__/renderer.cpython-313.pyc +0 -0
  27. package/core/forge/__pycache__/runtime_dispatcher.cpython-313.pyc +0 -0
  28. package/core/forge/__pycache__/schema.cpython-313.pyc +0 -0
  29. package/core/forge/orchestrator.py +50 -27
  30. package/core/forge/persistence.py +16 -0
  31. package/core/forge/renderer.py +16 -0
  32. package/core/forge/runtime_dispatcher.py +34 -19
  33. package/core/forge/schema.py +12 -0
  34. package/core/governance/__pycache__/__init__.cpython-312.pyc +0 -0
  35. package/core/governance/__pycache__/__init__.cpython-314.pyc +0 -0
  36. package/core/governance/__pycache__/closing_marker_check.cpython-313.pyc +0 -0
  37. package/core/governance/__pycache__/closing_marker_check.cpython-314.pyc +0 -0
  38. package/core/governance/__pycache__/compliance_telemetry.cpython-313.pyc +0 -0
  39. package/core/governance/__pycache__/constitution.cpython-312.pyc +0 -0
  40. package/core/governance/__pycache__/constitution.cpython-314.pyc +0 -0
  41. package/core/governance/__pycache__/evidence_checks.cpython-313.pyc +0 -0
  42. package/core/governance/__pycache__/kb_cite_check.cpython-314.pyc +0 -0
  43. package/core/governance/__pycache__/meta_tag_check.cpython-313.pyc +0 -0
  44. package/core/governance/__pycache__/meta_tag_check.cpython-314.pyc +0 -0
  45. package/core/governance/__pycache__/qg_verdict.cpython-313.pyc +0 -0
  46. package/core/governance/__pycache__/review_workflow.cpython-313.pyc +0 -0
  47. package/core/governance/__pycache__/skill_proposer.cpython-313.pyc +0 -0
  48. package/core/governance/__pycache__/skill_proposer.cpython-314.pyc +0 -0
  49. package/core/governance/__pycache__/sycophancy_detector.cpython-314.pyc +0 -0
  50. package/core/governance/closing_marker_check.py +9 -5
  51. package/core/governance/compliance_telemetry.py +1 -1
  52. package/core/governance/compliance_telemetry_cli.py +1 -1
  53. package/core/governance/evidence_checks.py +421 -0
  54. package/core/governance/meta_tag_check.py +36 -0
  55. package/core/governance/qg_verdict.py +78 -0
  56. package/core/governance/review_workflow.py +34 -1
  57. package/core/governance/skill_proposer.py +2 -1
  58. package/core/hooks/__init__.py +12 -0
  59. package/core/hooks/__pycache__/__init__.cpython-312.pyc +0 -0
  60. package/core/hooks/__pycache__/__init__.cpython-313.pyc +0 -0
  61. package/core/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
  62. package/core/hooks/__pycache__/_shared.cpython-312.pyc +0 -0
  63. package/core/hooks/__pycache__/_shared.cpython-313.pyc +0 -0
  64. package/core/hooks/__pycache__/_shared.cpython-314.pyc +0 -0
  65. package/core/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
  66. package/core/hooks/__pycache__/post_tool_use.cpython-313.pyc +0 -0
  67. package/core/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
  68. package/core/hooks/__pycache__/pre_tool_use.cpython-313.pyc +0 -0
  69. package/core/hooks/__pycache__/pre_tool_use.cpython-314.pyc +0 -0
  70. package/core/hooks/__pycache__/stop.cpython-312.pyc +0 -0
  71. package/core/hooks/__pycache__/stop.cpython-313.pyc +0 -0
  72. package/core/hooks/__pycache__/stop.cpython-314.pyc +0 -0
  73. package/core/hooks/__pycache__/user_prompt_submit.cpython-312.pyc +0 -0
  74. package/core/hooks/__pycache__/user_prompt_submit.cpython-313.pyc +0 -0
  75. package/core/hooks/_shared.py +110 -0
  76. package/core/hooks/post_tool_use.py +689 -0
  77. package/core/hooks/pre_tool_use.py +267 -0
  78. package/core/hooks/stop.py +395 -0
  79. package/core/hooks/user_prompt_submit.py +600 -0
  80. package/core/jobs/__pycache__/__init__.cpython-312.pyc +0 -0
  81. package/core/jobs/__pycache__/__init__.cpython-314.pyc +0 -0
  82. package/core/jobs/__pycache__/auto_doc_worker.cpython-312.pyc +0 -0
  83. package/core/jobs/__pycache__/auto_doc_worker.cpython-314.pyc +0 -0
  84. package/core/jobs/__pycache__/manager.cpython-312.pyc +0 -0
  85. package/core/jobs/__pycache__/manager.cpython-314.pyc +0 -0
  86. package/core/knowledge/__pycache__/embedder.cpython-312.pyc +0 -0
  87. package/core/knowledge/__pycache__/embedder.cpython-313.pyc +0 -0
  88. package/core/knowledge/__pycache__/vector_store.cpython-312.pyc +0 -0
  89. package/core/knowledge/__pycache__/vector_store.cpython-313.pyc +0 -0
  90. package/core/knowledge/embedder.py +118 -11
  91. package/core/knowledge/vector_store.py +111 -14
  92. package/core/memory/__pycache__/session_store.cpython-314.pyc +0 -0
  93. package/core/obsidian/__pycache__/relator.cpython-313.pyc +0 -0
  94. package/core/obsidian/relator.py +18 -8
  95. package/core/runtime/__pycache__/__init__.cpython-312.pyc +0 -0
  96. package/core/runtime/__pycache__/__init__.cpython-313.pyc +0 -0
  97. package/core/runtime/__pycache__/__init__.cpython-314.pyc +0 -0
  98. package/core/runtime/__pycache__/base.cpython-312.pyc +0 -0
  99. package/core/runtime/__pycache__/base.cpython-313.pyc +0 -0
  100. package/core/runtime/__pycache__/base.cpython-314.pyc +0 -0
  101. package/core/runtime/__pycache__/capabilities_cli.cpython-312.pyc +0 -0
  102. package/core/runtime/__pycache__/capabilities_cli.cpython-313.pyc +0 -0
  103. package/core/runtime/__pycache__/claude_code.cpython-312.pyc +0 -0
  104. package/core/runtime/__pycache__/claude_code.cpython-313.pyc +0 -0
  105. package/core/runtime/__pycache__/claude_code.cpython-314.pyc +0 -0
  106. package/core/runtime/__pycache__/codex_cli.cpython-312.pyc +0 -0
  107. package/core/runtime/__pycache__/codex_cli.cpython-313.pyc +0 -0
  108. package/core/runtime/__pycache__/codex_cli.cpython-314.pyc +0 -0
  109. package/core/runtime/__pycache__/cost_governor.cpython-312.pyc +0 -0
  110. package/core/runtime/__pycache__/cost_governor.cpython-313.pyc +0 -0
  111. package/core/runtime/__pycache__/cursor.cpython-312.pyc +0 -0
  112. package/core/runtime/__pycache__/cursor.cpython-313.pyc +0 -0
  113. package/core/runtime/__pycache__/cursor.cpython-314.pyc +0 -0
  114. package/core/runtime/__pycache__/gemini_cli.cpython-312.pyc +0 -0
  115. package/core/runtime/__pycache__/gemini_cli.cpython-313.pyc +0 -0
  116. package/core/runtime/__pycache__/gemini_cli.cpython-314.pyc +0 -0
  117. package/core/runtime/__pycache__/llm_cost_telemetry.cpython-314.pyc +0 -0
  118. package/core/runtime/__pycache__/llm_provider.cpython-312.pyc +0 -0
  119. package/core/runtime/__pycache__/llm_provider.cpython-313.pyc +0 -0
  120. package/core/runtime/__pycache__/llm_provider.cpython-314.pyc +0 -0
  121. package/core/runtime/__pycache__/llm_retry.cpython-312.pyc +0 -0
  122. package/core/runtime/__pycache__/llm_retry.cpython-313.pyc +0 -0
  123. package/core/runtime/__pycache__/llm_retry.cpython-314.pyc +0 -0
  124. package/core/runtime/__pycache__/native_usage.cpython-312.pyc +0 -0
  125. package/core/runtime/__pycache__/native_usage.cpython-313.pyc +0 -0
  126. package/core/runtime/__pycache__/native_usage.cpython-314.pyc +0 -0
  127. package/core/runtime/__pycache__/ollama_provider.cpython-314.pyc +0 -0
  128. package/core/runtime/__pycache__/path_resolver.cpython-312.pyc +0 -0
  129. package/core/runtime/__pycache__/pricing.cpython-312.pyc +0 -0
  130. package/core/runtime/__pycache__/pricing.cpython-313.pyc +0 -0
  131. package/core/runtime/__pycache__/pricing.cpython-314.pyc +0 -0
  132. package/core/runtime/__pycache__/registry.cpython-312.pyc +0 -0
  133. package/core/runtime/__pycache__/registry.cpython-313.pyc +0 -0
  134. package/core/runtime/__pycache__/registry.cpython-314.pyc +0 -0
  135. package/core/runtime/__pycache__/squad_orchestrator.cpython-312.pyc +0 -0
  136. package/core/runtime/base.py +29 -0
  137. package/core/runtime/capabilities_cli.py +74 -0
  138. package/core/runtime/claude_code.py +8 -0
  139. package/core/runtime/codex_cli.py +205 -37
  140. package/core/runtime/cost_governor.py +184 -0
  141. package/core/runtime/cursor.py +8 -0
  142. package/core/runtime/gemini_cli.py +8 -0
  143. package/core/runtime/llm_provider.py +32 -13
  144. package/core/runtime/llm_retry.py +233 -0
  145. package/core/runtime/native_usage.py +186 -0
  146. package/core/runtime/pricing.py +9 -0
  147. package/core/runtime/registry.py +3 -0
  148. package/core/shared/__pycache__/__init__.cpython-314.pyc +0 -0
  149. package/core/shared/__pycache__/safe_session_id.cpython-314.pyc +0 -0
  150. package/core/shared/__pycache__/test_evidence.cpython-313-pytest-9.1.1.pyc +0 -0
  151. package/core/shared/__pycache__/test_evidence.cpython-313.pyc +0 -0
  152. package/core/shared/test_evidence.py +34 -0
  153. package/core/synapse/__pycache__/__init__.cpython-314.pyc +0 -0
  154. package/core/synapse/__pycache__/agent_experiences_layer.cpython-312.pyc +0 -0
  155. package/core/synapse/__pycache__/cache.cpython-314.pyc +0 -0
  156. package/core/synapse/__pycache__/engine.cpython-312.pyc +0 -0
  157. package/core/synapse/__pycache__/engine.cpython-313.pyc +0 -0
  158. package/core/synapse/__pycache__/engine.cpython-314.pyc +0 -0
  159. package/core/synapse/__pycache__/graph_context_layer.cpython-313.pyc +0 -0
  160. package/core/synapse/__pycache__/kb_cache.cpython-312.pyc +0 -0
  161. package/core/synapse/__pycache__/kb_cache.cpython-313.pyc +0 -0
  162. package/core/synapse/__pycache__/kb_cache.cpython-314.pyc +0 -0
  163. package/core/synapse/__pycache__/layers.cpython-312.pyc +0 -0
  164. package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
  165. package/core/synapse/__pycache__/layers.cpython-314.pyc +0 -0
  166. package/core/synapse/engine.py +7 -0
  167. package/core/synapse/graph_context_layer.py +212 -0
  168. package/core/synapse/kb_cache.py +3 -0
  169. package/core/synapse/layers.py +104 -20
  170. package/core/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
  171. package/core/workflow/__pycache__/enforcer.cpython-313.pyc +0 -0
  172. package/core/workflow/__pycache__/engine.cpython-314.pyc +0 -0
  173. package/core/workflow/__pycache__/flow_enforcer.cpython-312.pyc +0 -0
  174. package/core/workflow/__pycache__/flow_enforcer.cpython-313.pyc +0 -0
  175. package/core/workflow/__pycache__/flow_enforcer.cpython-314.pyc +0 -0
  176. package/core/workflow/__pycache__/gate_checkpoint.cpython-312.pyc +0 -0
  177. package/core/workflow/__pycache__/gate_checkpoint.cpython-313.pyc +0 -0
  178. package/core/workflow/__pycache__/gate_checkpoint.cpython-314.pyc +0 -0
  179. package/core/workflow/__pycache__/loader.cpython-314.pyc +0 -0
  180. package/core/workflow/__pycache__/marker_cache.cpython-314.pyc +0 -0
  181. package/core/workflow/__pycache__/research_gate.cpython-313.pyc +0 -0
  182. package/core/workflow/__pycache__/research_gate.cpython-314.pyc +0 -0
  183. package/core/workflow/__pycache__/rules_registry.cpython-313.pyc +0 -0
  184. package/core/workflow/__pycache__/schema.cpython-314.pyc +0 -0
  185. package/core/workflow/__pycache__/specialist_enforcer.cpython-312.pyc +0 -0
  186. package/core/workflow/__pycache__/specialist_enforcer.cpython-313.pyc +0 -0
  187. package/core/workflow/__pycache__/state.cpython-314.pyc +0 -0
  188. package/core/workflow/enforcer.py +5 -16
  189. package/core/workflow/flow_enforcer.py +36 -11
  190. package/core/workflow/gate_checkpoint.py +149 -0
  191. package/core/workflow/research_gate.py +15 -3
  192. package/core/workflow/rules_registry.py +137 -389
  193. package/core/workflow/specialist_enforcer.py +21 -4
  194. package/dashboard/app/pages/knowledge/index.vue +4 -1
  195. package/departments/ops/skills/n8n-flow/SKILL.md +13 -0
  196. package/departments/ops/skills/workflow-automate/SKILL.md +16 -0
  197. package/departments/quality/SKILL.md +45 -5
  198. package/departments/quality/agents/copy-director.yaml +3 -1
  199. package/departments/quality/agents/tech-director.yaml +3 -1
  200. package/installer/adapters/claude-code.js +46 -2
  201. package/installer/config-seed.js +39 -14
  202. package/installer/doctor.js +8 -0
  203. package/installer/graphify.js +153 -0
  204. package/installer/index.js +20 -0
  205. package/installer/init.js +11 -0
  206. package/installer/update.js +19 -0
  207. package/package.json +1 -1
  208. package/pyproject.toml +3 -1
  209. package/scripts/__pycache__/dashboard-api.cpython-313.pyc +0 -0
  210. package/scripts/__pycache__/knowledge-index.cpython-313.pyc +0 -0
  211. package/scripts/__pycache__/synapse-bridge.cpython-312.pyc +0 -0
  212. package/scripts/__pycache__/synapse-bridge.cpython-313.pyc +0 -0
  213. package/scripts/knowledge-index.py +8 -2
  214. package/scripts/synapse-bridge.py +102 -26
@@ -0,0 +1,50 @@
1
+ ---
2
+ name: paulo-tech-lead
3
+ description: >
4
+ Paulo — Dev squad Tech Lead (Tier 1). Orchestrates dev workflows: breaks
5
+ work into atomic tasks, dispatches specialists, enforces the evidence flow
6
+ (real test runs, exit codes on record), and submits deliverables to the
7
+ Quality Gate before anything ships.
8
+ tools: Read, Grep, Glob, Bash, Agent, TaskCreate
9
+ model: sonnet
10
+ ---
11
+
12
+ # Paulo — Tech Lead (Dev Orchestrator)
13
+
14
+ You are Paulo, Tech Lead of the dev squad. DISC I+S, Enneagram 2w3 (ENFJ).
15
+ Servant leader: encouraging, clear, breaks complex problems into digestible
16
+ steps. Under pressure you rally the team and shield it from chaos — you do
17
+ not cut corners to look fast.
18
+
19
+ ## How You Orchestrate
20
+
21
+ 1. Read context first: CLAUDE.md, the approved spec/ADR, existing patterns.
22
+ 2. Break the work into atomic, independently verifiable tasks with clear
23
+ ownership; dispatch specialists via the Agent tool and announce every
24
+ dispatch with `[arka:dispatch] paulo -> <specialist>`.
25
+ 3. Evidence over narration: a task is done when its tests RAN and exited 0
26
+ on record — never when a subagent says it is done. Run
27
+ `python -m core.governance.evidence_checks <project_dir> --json` before
28
+ claiming completion.
29
+ 4. Submit to the Quality Gate (marta-cqo) with the evidence report; expect
30
+ a structured `QGVerdict` back. REJECTED means loop, not negotiate.
31
+ 5. Respect ownership boundaries: you orchestrate and review; specialists
32
+ write specialist-owned files. Escalate architecture calls to the CTO.
33
+
34
+ ## Standards You Enforce
35
+
36
+ - SOLID, Clean Code: functions under 30 lines, max 3 nesting levels,
37
+ self-documenting names, no dead code.
38
+ - TDD where practical; coverage >= 80% on new code (constitution MUST).
39
+ - Conventional commits, feature branches, never commit to main/master/dev.
40
+ - Model routing: dispatch specialists on sonnet, mechanical tasks on haiku;
41
+ opus only for Tier 0/security-scope reviews.
42
+
43
+ ## Signature Rules (anti-sycophancy)
44
+
45
+ - Supportive and structured — task lists with clear ownership, "vamos",
46
+ "alinhamos", direct OKs.
47
+ - NEVER: "you're absolutely right", "amazing work", "great job, everyone",
48
+ "I appreciate your patience", "thanks for understanding".
49
+ - No blame language, but no inflated praise either. Status is facts:
50
+ what ran, what passed, what is blocked.
@@ -29,3 +29,18 @@ schedules:
29
29
  retry_on_fail: true
30
30
  max_retries: 2
31
31
  timeout_minutes: 90
32
+ # ── Goal mode (v4.1.0, opt-in — Claude Code /goal primitive) ──────
33
+ # Uncomment BOTH lines to make the research cycle run until the model
34
+ # judges the condition met, bounded by task_budget tasks. NEVER set
35
+ # goal_condition without task_budget — the daemon raises ValueError
36
+ # (infinite-loop / metered-burn guard, Claude Code v2.1.139 caveat).
37
+ # goal_condition: "research digest written to vault with >=3 cited sources"
38
+ # task_budget: 25
39
+
40
+ # ── Goal mode for dreaming (opt-in) ──────────────────────────────────
41
+ # The dreaming entry above uses python_module (Dreaming v2), and goal
42
+ # flags only apply to the Claude-CLI prompt path — python_module entries
43
+ # ignore them. To run dreaming in goal mode, remove `python_module` /
44
+ # `module_args` (falling back to prompt_file) and add, paired:
45
+ # goal_condition: "insights drafted, critic-passed, written to vault"
46
+ # task_budget: 15
@@ -67,26 +67,17 @@ enforcement_levels:
67
67
  enforcement: "Plan Critic validates constitution compliance; PostToolUse monitors execution"
68
68
 
69
69
  - id: mandatory-skill-evaluation
70
- rule: "After every completed substantive task (Phase 13 marker fires), the system MUST evaluate whether the work just done represents a repeatable capability that should be captured as a permanent skill. Proposals are written to ~/.arkaos/skill-proposals/<date>-<slug>.md for operator review. Bypass via [arka:trivial] or [arka:skill-skip]."
70
+ rule: "After every completed substantive task (Gate 4 marker fires), the system MUST evaluate whether the work just done represents a repeatable capability that should be captured as a permanent skill. Proposals are written to ~/.arkaos/skill-proposals/<date>-<slug>.md for operator review. Bypass via [arka:trivial] or [arka:skill-skip]."
71
71
  enforcement: "Stop hook calls core.governance.skill_proposer.evaluate on the closing transcript tail. When the classifier returns should_propose=True a SKILL.md draft is written. Operator promotes via /arka skill-promote (PR45) or manual scaffold under departments/<dept>/skills/<slug>/."
72
72
 
73
- - id: mandatory-flow
74
- 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."
75
- 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."
73
+ - id: evidence-flow
74
+ rule: "Every non-trivial request executes the 4-gate evidence flow defined in arka/skills/flow/SKILL.md. Gates pass on evidence read from disk (command output, exit codes, files), never on the model narrating that work happened. No task type, no context, no runtime setting can opt out. The only bypass is [arka:trivial] for single-file edits under 10 lines. Replaced the 13-phase mandatory-flow in v4.1.0 (operator decision 2026-07-04; ADR docs/adr/2026-07-04-evidence-flow.md)."
75
+ enforcement: "UserPromptSubmit hook classifies the turn; SessionStart systemMessage embeds the flow at system-prompt priority; Stop hook persists [arka:gate:N] transitions via core/workflow/gate_checkpoint.py for structured resume; Gate 3 closes only with a real test run on record; violation is a constitution breach, not a style issue."
76
76
  phases:
77
- - "1. Input (verbatim)"
78
- - "2. Get context (profile, repo, KB, session digests)"
79
- - "3. Decide context and route ([arka:routing] tag)"
80
- - "4. Call hierarchy (Tier 0 when strategic/cross-dept)"
81
- - "5. Understand and research (Obsidian + vector DB)"
82
- - "6. Call team (squad + specialists via Agent)"
83
- - "7. Plan with six parallel reviewers"
84
- - "8. Present plan (save to Obsidian + vector DB + cache)"
85
- - "9. Wait for explicit approval"
86
- - "10. TODO list"
87
- - "11. Per-todo loop: team call -> complete -> QA -> Security -> Quality Gate -> Document"
88
- - "12. Loop until TODO exhausted"
89
- - "13. Detailed summary"
77
+ - "Gate 1. CONTEXT — [arka:routing] + KB/graph grounding with citations"
78
+ - "Gate 2. PLAN short plan + EXPLICIT user approval (silence is not approval)"
79
+ - "Gate 3. EXECUTE atomic steps; closes only with test suite run + exit 0 evidence"
80
+ - "Gate 4. REVIEW executable checks (lint/type/coverage/security/spell) + honest summary"
90
81
 
91
82
  # ─── Rules added in PR10 v2.32.0 (2026-05-13 Conclave Phase 5) ───────
92
83
  # The 7 below codify the operational doctrine surfaced in the
@@ -130,6 +121,10 @@ enforcement_levels:
130
121
  description: "Mandatory pre-delivery review. Nothing ships without APPROVED verdict."
131
122
  trigger: "After the last execution phase, before delivery to user"
132
123
  frequency: "Once per workflow execution, not per phase"
124
+ model_policy:
125
+ default: sonnet
126
+ opus_scope: "Tier 0 diffs only: constitution, security-relevant changes, release pipeline, installer auth — or deliverables explicitly security-flagged"
127
+ note: "Marta's veto is model-independent: the verdict derives from the evidence report (core.governance.evidence_checks), not from model size."
133
128
  agents:
134
129
  orchestrator:
135
130
  id: cqo-marta
@@ -143,9 +138,10 @@ enforcement_levels:
143
138
  scope: "All technical: code quality, tests, UX/UI, data integrity, security, performance"
144
139
  veto_power: true
145
140
  process:
146
- - "Marta receives all output from execution phase"
147
- - "Marta dispatches Eduardo (text) and Francisca (technical) in parallel"
148
- - "Each reviewer returns APPROVED or REJECTED with specific issues"
141
+ - "Evidence engine runs first: python -m core.governance.evidence_checks — the verdict derives from its report"
142
+ - "Marta receives all output from execution phase plus the evidence report"
143
+ - "Marta dispatches Eduardo (text) and Francisca (technical) in parallel to interpret the report"
144
+ - "Each reviewer returns a structured QGVerdict (APPROVED or REJECTED) with specific issues; evidence overall=fail forces REJECTED"
149
145
  - "If ANY reviewer rejects: work loops back to execution with issue list"
150
146
  - "If ALL approve: Marta issues final APPROVED verdict"
151
147
  - "Nothing reaches the user without APPROVED from all three"
@@ -186,7 +182,7 @@ enforcement_levels:
186
182
  enforcement: "persistence.py exports on status change; audit detects missing exports"
187
183
 
188
184
  - id: model-routing
189
- rule: "Per-tier model assignment enforced: Tier 0 opus, Tier 1/2 sonnet, mechanical haiku. Quality Gate ALWAYS opus."
185
+ rule: "Per-tier model assignment enforced: Tier 0 opus, Tier 1/2 sonnet, mechanical haiku. Quality Gate reviewers run sonnet by default; opus ONLY for Tier 0/security-scope diffs (constitution, security, release pipeline, installer auth). Marta keeps her veto regardless of model tier."
190
186
  enforcement: "warning"
191
187
 
192
188
  - id: subagent-discipline
@@ -2,7 +2,7 @@
2
2
  # ============================================================================
3
3
  # ArkaOS v2 — Shared Workflow Classifier
4
4
  #
5
- # Decides whether a user prompt triggers the mandatory 13-phase flow.
5
+ # Decides whether a user prompt triggers the 4-gate evidence flow.
6
6
  # Used by: user-prompt-submit.sh, pre-tool-use.sh, stop.sh.
7
7
  #
8
8
  # Contract: