arkaos 4.0.2 → 4.1.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/README.md +2 -2
- package/VERSION +1 -1
- package/arka/SKILL.md +16 -22
- package/arka/skills/flow/SKILL.md +108 -234
- package/config/claude-agents/eduardo-copy.md +53 -0
- package/config/claude-agents/francisca-tech.md +52 -0
- package/config/claude-agents/marta-cqo.md +52 -0
- package/config/claude-agents/paulo-tech-lead.md +50 -0
- package/config/cognition/schedules.yaml +15 -0
- package/config/constitution.yaml +17 -21
- package/config/hooks/_lib/workflow-classifier.sh +1 -1
- package/config/hooks/post-tool-use.sh +40 -539
- package/config/hooks/pre-tool-use.sh +32 -281
- package/config/hooks/session-start.sh +8 -10
- package/config/hooks/stop.sh +30 -425
- package/config/hooks/user-prompt-submit.sh +42 -459
- package/core/cognition/__pycache__/dreaming.cpython-313.pyc +0 -0
- package/core/cognition/dreaming.py +5 -0
- package/core/cognition/scheduler/__pycache__/daemon.cpython-313.pyc +0 -0
- package/core/cognition/scheduler/daemon.py +10 -0
- package/core/forge/__init__.py +2 -0
- package/core/forge/__pycache__/__init__.cpython-313.pyc +0 -0
- package/core/forge/__pycache__/orchestrator.cpython-313.pyc +0 -0
- package/core/forge/__pycache__/persistence.cpython-313.pyc +0 -0
- package/core/forge/__pycache__/renderer.cpython-313.pyc +0 -0
- package/core/forge/__pycache__/runtime_dispatcher.cpython-313.pyc +0 -0
- package/core/forge/__pycache__/schema.cpython-313.pyc +0 -0
- package/core/forge/orchestrator.py +50 -27
- package/core/forge/persistence.py +16 -0
- package/core/forge/renderer.py +16 -0
- package/core/forge/runtime_dispatcher.py +34 -19
- package/core/forge/schema.py +12 -0
- package/core/governance/__pycache__/__init__.cpython-312.pyc +0 -0
- package/core/governance/__pycache__/closing_marker_check.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/compliance_telemetry.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/constitution.cpython-312.pyc +0 -0
- package/core/governance/__pycache__/evidence_checks.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/meta_tag_check.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/qg_verdict.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/review_workflow.cpython-313.pyc +0 -0
- package/core/governance/__pycache__/skill_proposer.cpython-313.pyc +0 -0
- package/core/governance/closing_marker_check.py +9 -5
- package/core/governance/compliance_telemetry.py +1 -1
- package/core/governance/compliance_telemetry_cli.py +1 -1
- package/core/governance/evidence_checks.py +421 -0
- package/core/governance/meta_tag_check.py +36 -0
- package/core/governance/qg_verdict.py +78 -0
- package/core/governance/review_workflow.py +34 -1
- package/core/governance/skill_proposer.py +2 -1
- package/core/hooks/__init__.py +12 -0
- package/core/hooks/__pycache__/__init__.cpython-312.pyc +0 -0
- package/core/hooks/__pycache__/__init__.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/_shared.cpython-312.pyc +0 -0
- package/core/hooks/__pycache__/_shared.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/post_tool_use.cpython-312.pyc +0 -0
- package/core/hooks/__pycache__/post_tool_use.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/pre_tool_use.cpython-312.pyc +0 -0
- package/core/hooks/__pycache__/pre_tool_use.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/stop.cpython-312.pyc +0 -0
- package/core/hooks/__pycache__/stop.cpython-313.pyc +0 -0
- package/core/hooks/__pycache__/user_prompt_submit.cpython-312.pyc +0 -0
- package/core/hooks/__pycache__/user_prompt_submit.cpython-313.pyc +0 -0
- package/core/hooks/_shared.py +110 -0
- package/core/hooks/post_tool_use.py +689 -0
- package/core/hooks/pre_tool_use.py +267 -0
- package/core/hooks/stop.py +395 -0
- package/core/hooks/user_prompt_submit.py +600 -0
- package/core/jobs/__pycache__/__init__.cpython-312.pyc +0 -0
- package/core/jobs/__pycache__/auto_doc_worker.cpython-312.pyc +0 -0
- package/core/jobs/__pycache__/manager.cpython-312.pyc +0 -0
- package/core/knowledge/__pycache__/embedder.cpython-312.pyc +0 -0
- package/core/knowledge/__pycache__/embedder.cpython-313.pyc +0 -0
- package/core/knowledge/__pycache__/vector_store.cpython-312.pyc +0 -0
- package/core/knowledge/__pycache__/vector_store.cpython-313.pyc +0 -0
- package/core/knowledge/embedder.py +118 -11
- package/core/knowledge/vector_store.py +111 -14
- package/core/runtime/__pycache__/__init__.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/__init__.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/base.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/base.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/capabilities_cli.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/capabilities_cli.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/claude_code.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/claude_code.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/codex_cli.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/codex_cli.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/cost_governor.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/cost_governor.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/cursor.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/cursor.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/gemini_cli.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/gemini_cli.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/llm_provider.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/llm_provider.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/llm_retry.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/llm_retry.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/native_usage.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/native_usage.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/path_resolver.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/pricing.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/pricing.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/registry.cpython-312.pyc +0 -0
- package/core/runtime/__pycache__/registry.cpython-313.pyc +0 -0
- package/core/runtime/__pycache__/squad_orchestrator.cpython-312.pyc +0 -0
- package/core/runtime/base.py +29 -0
- package/core/runtime/capabilities_cli.py +74 -0
- package/core/runtime/claude_code.py +8 -0
- package/core/runtime/codex_cli.py +205 -37
- package/core/runtime/cost_governor.py +184 -0
- package/core/runtime/cursor.py +8 -0
- package/core/runtime/gemini_cli.py +8 -0
- package/core/runtime/llm_provider.py +32 -13
- package/core/runtime/llm_retry.py +233 -0
- package/core/runtime/native_usage.py +186 -0
- package/core/runtime/pricing.py +9 -0
- package/core/runtime/registry.py +3 -0
- package/core/shared/__pycache__/test_evidence.cpython-313-pytest-9.1.1.pyc +0 -0
- package/core/shared/__pycache__/test_evidence.cpython-313.pyc +0 -0
- package/core/shared/test_evidence.py +34 -0
- package/core/synapse/__pycache__/agent_experiences_layer.cpython-312.pyc +0 -0
- package/core/synapse/__pycache__/engine.cpython-312.pyc +0 -0
- package/core/synapse/__pycache__/engine.cpython-313.pyc +0 -0
- package/core/synapse/__pycache__/graph_context_layer.cpython-313.pyc +0 -0
- package/core/synapse/__pycache__/kb_cache.cpython-312.pyc +0 -0
- package/core/synapse/__pycache__/kb_cache.cpython-313.pyc +0 -0
- package/core/synapse/__pycache__/layers.cpython-312.pyc +0 -0
- package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
- package/core/synapse/engine.py +7 -0
- package/core/synapse/graph_context_layer.py +212 -0
- package/core/synapse/kb_cache.py +3 -0
- package/core/synapse/layers.py +104 -20
- package/core/workflow/__pycache__/enforcer.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/flow_enforcer.cpython-312.pyc +0 -0
- package/core/workflow/__pycache__/flow_enforcer.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/gate_checkpoint.cpython-312.pyc +0 -0
- package/core/workflow/__pycache__/gate_checkpoint.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/research_gate.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/rules_registry.cpython-313.pyc +0 -0
- package/core/workflow/__pycache__/specialist_enforcer.cpython-312.pyc +0 -0
- package/core/workflow/__pycache__/specialist_enforcer.cpython-313.pyc +0 -0
- package/core/workflow/enforcer.py +5 -16
- package/core/workflow/flow_enforcer.py +36 -11
- package/core/workflow/gate_checkpoint.py +149 -0
- package/core/workflow/research_gate.py +15 -3
- package/core/workflow/rules_registry.py +137 -389
- package/core/workflow/specialist_enforcer.py +21 -4
- package/dashboard/app/pages/knowledge/index.vue +4 -1
- package/departments/ops/skills/n8n-flow/SKILL.md +13 -0
- package/departments/ops/skills/workflow-automate/SKILL.md +16 -0
- package/departments/quality/SKILL.md +45 -5
- package/departments/quality/agents/copy-director.yaml +3 -1
- package/departments/quality/agents/tech-director.yaml +3 -1
- package/installer/adapters/claude-code.js +46 -2
- package/installer/config-seed.js +39 -14
- package/installer/doctor.js +8 -0
- package/installer/graphify.js +153 -0
- package/installer/index.js +20 -0
- package/installer/init.js +11 -0
- package/installer/update.js +19 -0
- package/package.json +1 -1
- package/pyproject.toml +1 -1
- package/scripts/__pycache__/dashboard-api.cpython-313.pyc +0 -0
- package/scripts/__pycache__/knowledge-index.cpython-313.pyc +0 -0
- package/scripts/__pycache__/synapse-bridge.cpython-312.pyc +0 -0
- package/scripts/__pycache__/synapse-bridge.cpython-313.pyc +0 -0
- package/scripts/knowledge-index.py +8 -2
- 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
|
package/config/constitution.yaml
CHANGED
|
@@ -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 (
|
|
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:
|
|
74
|
-
rule: "Every non-trivial request executes the
|
|
75
|
-
enforcement: "UserPromptSubmit hook classifies the turn; SessionStart systemMessage embeds the flow at system-prompt priority; arka/
|
|
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.
|
|
78
|
-
- "2.
|
|
79
|
-
- "3.
|
|
80
|
-
- "4.
|
|
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
|
-
- "
|
|
147
|
-
- "Marta
|
|
148
|
-
- "
|
|
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
|
|
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
|
|
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:
|