agentic-workflow-toolchain 1.2.1__tar.gz

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 (77) hide show
  1. agentic_workflow_toolchain-1.2.1/LICENSE +21 -0
  2. agentic_workflow_toolchain-1.2.1/PKG-INFO +377 -0
  3. agentic_workflow_toolchain-1.2.1/README.md +350 -0
  4. agentic_workflow_toolchain-1.2.1/agentic_workflow/__init__.py +37 -0
  5. agentic_workflow_toolchain-1.2.1/agentic_workflow/cli.py +144 -0
  6. agentic_workflow_toolchain-1.2.1/agentic_workflow_toolchain.egg-info/PKG-INFO +377 -0
  7. agentic_workflow_toolchain-1.2.1/agentic_workflow_toolchain.egg-info/SOURCES.txt +75 -0
  8. agentic_workflow_toolchain-1.2.1/agentic_workflow_toolchain.egg-info/dependency_links.txt +1 -0
  9. agentic_workflow_toolchain-1.2.1/agentic_workflow_toolchain.egg-info/entry_points.txt +3 -0
  10. agentic_workflow_toolchain-1.2.1/agentic_workflow_toolchain.egg-info/requires.txt +1 -0
  11. agentic_workflow_toolchain-1.2.1/agentic_workflow_toolchain.egg-info/top_level.txt +2 -0
  12. agentic_workflow_toolchain-1.2.1/core/__init__.py +52 -0
  13. agentic_workflow_toolchain-1.2.1/core/ai_evaluator.py +117 -0
  14. agentic_workflow_toolchain-1.2.1/core/autopilot_engine.py +368 -0
  15. agentic_workflow_toolchain-1.2.1/core/clean_code_guard.py +188 -0
  16. agentic_workflow_toolchain-1.2.1/core/engine_py/__init__.py +29 -0
  17. agentic_workflow_toolchain-1.2.1/core/engine_py/agent_worker.py +136 -0
  18. agentic_workflow_toolchain-1.2.1/core/engine_py/decider.py +150 -0
  19. agentic_workflow_toolchain-1.2.1/core/engine_py/energy.py +45 -0
  20. agentic_workflow_toolchain-1.2.1/core/engine_py/event_bus.py +63 -0
  21. agentic_workflow_toolchain-1.2.1/core/engine_py/executor.py +186 -0
  22. agentic_workflow_toolchain-1.2.1/core/engine_py/models.py +193 -0
  23. agentic_workflow_toolchain-1.2.1/core/engine_py/queue.py +314 -0
  24. agentic_workflow_toolchain-1.2.1/core/engine_py/runner.py +116 -0
  25. agentic_workflow_toolchain-1.2.1/core/engine_py/system_workers.py +70 -0
  26. agentic_workflow_toolchain-1.2.1/core/engine_py/toon_adapter.py +586 -0
  27. agentic_workflow_toolchain-1.2.1/core/engine_py/verification_controller.py +208 -0
  28. agentic_workflow_toolchain-1.2.1/core/engine_py/worker.py +167 -0
  29. agentic_workflow_toolchain-1.2.1/core/engine_spec/event_schema.json +65 -0
  30. agentic_workflow_toolchain-1.2.1/core/engine_spec/example_workflow.yaml +73 -0
  31. agentic_workflow_toolchain-1.2.1/core/engine_spec/workflow_schema.json +127 -0
  32. agentic_workflow_toolchain-1.2.1/core/hooks/__init__.py +29 -0
  33. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/__init__.py +25 -0
  34. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/claude_adapter.py +83 -0
  35. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/cli_agent_adapter.py +82 -0
  36. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/codex_adapter.py +78 -0
  37. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/cursor_adapter.py +73 -0
  38. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/gemini_adapter.py +93 -0
  39. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/homebrew_adapter.py +69 -0
  40. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/mcp_proxy.py +133 -0
  41. agentic_workflow_toolchain-1.2.1/core/hooks/adapters/shell_adapter.py +65 -0
  42. agentic_workflow_toolchain-1.2.1/core/hooks/dispatcher.py +118 -0
  43. agentic_workflow_toolchain-1.2.1/core/hooks/policy_engine.py +375 -0
  44. agentic_workflow_toolchain-1.2.1/core/hooks/session_end.py +141 -0
  45. agentic_workflow_toolchain-1.2.1/core/hooks/types.py +147 -0
  46. agentic_workflow_toolchain-1.2.1/core/integrations/__init__.py +28 -0
  47. agentic_workflow_toolchain-1.2.1/core/integrations/installer.py +225 -0
  48. agentic_workflow_toolchain-1.2.1/core/integrations/lifecycle_director.py +175 -0
  49. agentic_workflow_toolchain-1.2.1/core/integrations/registry.py +105 -0
  50. agentic_workflow_toolchain-1.2.1/core/multi_agent_system.py +164 -0
  51. agentic_workflow_toolchain-1.2.1/core/skills_indexer.py +742 -0
  52. agentic_workflow_toolchain-1.2.1/core/system/__init__.py +25 -0
  53. agentic_workflow_toolchain-1.2.1/core/system/announcements.py +72 -0
  54. agentic_workflow_toolchain-1.2.1/core/system/dependencies.py +69 -0
  55. agentic_workflow_toolchain-1.2.1/core/system/doctor.py +171 -0
  56. agentic_workflow_toolchain-1.2.1/core/system/health.py +144 -0
  57. agentic_workflow_toolchain-1.2.1/core/system/installer.py +137 -0
  58. agentic_workflow_toolchain-1.2.1/core/system/notifications.py +97 -0
  59. agentic_workflow_toolchain-1.2.1/core/system/refresher.py +110 -0
  60. agentic_workflow_toolchain-1.2.1/core/system/updater.py +167 -0
  61. agentic_workflow_toolchain-1.2.1/core/system/version_tracker.py +65 -0
  62. agentic_workflow_toolchain-1.2.1/pyproject.toml +61 -0
  63. agentic_workflow_toolchain-1.2.1/setup.cfg +4 -0
  64. agentic_workflow_toolchain-1.2.1/tests/test_agentic_engine_py.py +242 -0
  65. agentic_workflow_toolchain-1.2.1/tests/test_ai_evaluator.py +48 -0
  66. agentic_workflow_toolchain-1.2.1/tests/test_autopilot_engine.py +48 -0
  67. agentic_workflow_toolchain-1.2.1/tests/test_clean_code_guard.py +49 -0
  68. agentic_workflow_toolchain-1.2.1/tests/test_cursor_codex_adapters.py +51 -0
  69. agentic_workflow_toolchain-1.2.1/tests/test_gemini_adapter.py +65 -0
  70. agentic_workflow_toolchain-1.2.1/tests/test_integrations_py.py +179 -0
  71. agentic_workflow_toolchain-1.2.1/tests/test_multi_agent_system.py +66 -0
  72. agentic_workflow_toolchain-1.2.1/tests/test_omni_skill_integration.py +72 -0
  73. agentic_workflow_toolchain-1.2.1/tests/test_retry_manager.py +172 -0
  74. agentic_workflow_toolchain-1.2.1/tests/test_skills_indexer.py +186 -0
  75. agentic_workflow_toolchain-1.2.1/tests/test_system_engines_py.py +122 -0
  76. agentic_workflow_toolchain-1.2.1/tests/test_toon_compliance_py.py +129 -0
  77. agentic_workflow_toolchain-1.2.1/tests/test_universal_hooks_py.py +269 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mamdouh Aboammar & Yoonsik Choi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,377 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentic-workflow-toolchain
3
+ Version: 1.2.1
4
+ Summary: Pluripotent stem-cell framework and universal agentic toolchain for autonomous workflows
5
+ Author: Mamdouh Aboammar
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/imMamdouhaboammar/agentic-workflow
8
+ Project-URL: Repository, https://github.com/imMamdouhaboammar/agentic-workflow.git
9
+ Project-URL: Issues, https://github.com/imMamdouhaboammar/agentic-workflow/issues
10
+ Keywords: agentic-workflow,agent-skill,skills-sh,claude-code,antigravity,gemini-cli,cursor,codex,opencode,workflow-automation,multi-agent-systems,autonomous-agents
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: pyyaml>=6.0
26
+ Dynamic: license-file
27
+
28
+ <div align="center">
29
+
30
+ # ⚡ AgenticWorkflow ⚡
31
+
32
+ ### Pluripotent Stem-Cell Framework & Universal Agentic Toolchain
33
+ **Deterministic Quality Gates • Multi-Engine Autopilot • Single-File SOT • TOON v4.1 Density**
34
+
35
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
36
+ [![Bun](https://img.shields.io/badge/Runtime-Bun%20%3E%3D1.0-FBF0DF?style=flat-square&logo=bun&logoColor=black)](https://bun.sh)
37
+ [![Python](https://img.shields.io/badge/Python-%3E%3D3.10-3776AB?style=flat-square&logo=python&logoColor=white)](https://python.org)
38
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-3178C6?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
39
+ [![npm](https://img.shields.io/badge/npm-agentic--workflow-CB3837?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/agentic-workflow)
40
+ [![PyPI](https://img.shields.io/badge/PyPI-agentic--workflow-3775A9?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/agentic-workflow)
41
+ [![Skills.sh](https://img.shields.io/badge/Skills.sh-Compatible-000000?style=flat-square&logo=vercel&logoColor=white)](https://skills.sh)
42
+ [![Claude Code](https://img.shields.io/badge/Claude%20Code-Certified%20Skill-D97706?style=flat-square&logo=anthropic&logoColor=white)](https://claude.ai)
43
+ [![Cursor](https://img.shields.io/badge/Cursor-Rules%20%26%20Skills-000000?style=flat-square&logo=cursor&logoColor=white)](https://cursor.com)
44
+ [![CI](https://img.shields.io/badge/CI-Passing-10B981?style=flat-square&logo=githubactions&logoColor=white)](https://github.com/imMamdouhaboammar/agentic-workflow/actions)
45
+
46
+ <p align="center">
47
+ <a href="#-universal-installation--quickstart">Quickstart</a> •
48
+ <a href="#1--one-click-agent-self-install--init-prompt">Agent Prompt</a> •
49
+ <a href="#-why-agenticworkflow-exists">Why It Exists</a> •
50
+ <a href="#-architecture">Architecture</a> •
51
+ <a href="#-dual-language-sdk-usage">SDK Usage</a> •
52
+ <a href="#-cli-reference">CLI Reference</a> •
53
+ <a href="#-supportive-tools">Supportive Tools</a> •
54
+ <a href="#-license">License</a>
55
+ </p>
56
+
57
+ </div>
58
+
59
+ ---
60
+
61
+ ## 🚀 Universal Installation & Quickstart
62
+
63
+ AgenticWorkflow is packaged and distributable across every major package registry, AI harness, and container platform:
64
+
65
+ ### 1. 🤖 One-Click Agent Self-Install & Init Prompt
66
+
67
+ Paste this prompt directly into your AI coding agent (Claude Code, Antigravity / Gemini CLI, Cursor, Codex, OpenCode, or Windsurf) to let it autonomously install, configure, initialize, and verify `AgenticWorkflow` in one shot:
68
+
69
+ <details>
70
+ <summary><b>👉 Click to expand the Smart Agent Prompts (Master Prompt & Quick-Fire)</b></summary>
71
+
72
+ <br>
73
+
74
+ > [!TIP]
75
+ > **Copy & Paste into your Agent Chat:**
76
+
77
+ ````markdown
78
+ You are acting as an autonomous DevOps & Systems Integration Agent.
79
+ Your objective is to install, configure, initialize, and verify the `agentic-workflow` framework in this workspace in a single uninterrupted execution loop.
80
+
81
+ Execute the following 4 phases autonomously:
82
+
83
+ ### Phase 1: Universal Installation
84
+ 1. Detect available runtimes on the system (`python3`, `bun`, `npm`, `curl`, `git`).
85
+ 2. Run the universal one-line installer:
86
+ ```bash
87
+ curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/agentic-workflow/main/install.sh | bash
88
+ ```
89
+ *(Fallback if offline or in a local clone: run `./install.sh` or `bun add -g agentic-workflow` / `npm install -g agentic-workflow`)*.
90
+ 3. Ensure `~/.local/bin` is in `$PATH` so the `agentic-workflow` CLI binary is immediately executable.
91
+
92
+ ### Phase 2: Host & Workspace Configuration
93
+ 1. Detect the current agent harness and verify registration in the appropriate skill directories:
94
+ - Claude Code: `~/.claude/skills/agentic-workflow`
95
+ - Gemini CLI / Antigravity: `~/.gemini/config/skills/agentic-workflow`
96
+ - Cursor: `~/.cursor/skills/agentic-workflow`
97
+ - Codex / OpenCode: `~/.codex/skills/agentic-workflow`
98
+ - Universal Agent Kernel: `~/.agents/skills/agentic-workflow`
99
+ 2. If this workspace lacks an `AGENTS.md` directive, link or import the AgenticWorkflow constitution (`AGENTS.md` and `GEMINI.md` / `CLAUDE.md`) so all subagents inherit:
100
+ - Absolute Criterion 1: Deliverable Quality over speed/token cost.
101
+ - Absolute Criterion 2: Single-File SOT (`state.yaml`) with single-writer lock.
102
+ - Absolute Criterion 3: Code Change Protocol (CCP: Understand Intent → Ripple Effect Analysis → Step Plan).
103
+ - 4-Layer Quality Assurance: L0 Anti-Skip → L1 Verification → L1.5 pACS Pre-mortem scoring → L2 Adversarial Review.
104
+ 3. Provision supportive tools by running:
105
+ ```bash
106
+ agentic-workflow integrations install
107
+ ```
108
+ Confirm integration of Ponytail (YAGNI & surgical diffs), TOON v4.1 (token compression), Fable (circuit breaker), and Caveman (concise mode).
109
+
110
+ ### Phase 3: Initialization (`init`)
111
+ 1. Run the native initialization command:
112
+ ```bash
113
+ agentic-workflow init
114
+ ```
115
+ 2. Confirm that:
116
+ - Runtime directories (`context-snapshots/`, `autopilot-logs/`, `diagnosis-logs/`) are generated.
117
+ - Core hook scripts in `.claude/hooks/scripts/` have validated syntax and execution permissions.
118
+ - The skills mesh index (`core/skills_indexer.py`) is indexed and queryable.
119
+
120
+ ### Phase 4: Validation & Status Report
121
+ 1. Verify the setup by running:
122
+ ```bash
123
+ agentic-workflow validate
124
+ agentic-workflow integrations status
125
+ ```
126
+ 2. Print a concise completion summary formatted in TOON v4.1 or a clean Markdown table showing CLI status, host skill registration paths, supportive tools readiness, and quality gates status.
127
+
128
+ Proceed and execute all steps now without stopping for manual input.
129
+ ````
130
+
131
+ #### ⚡ Quick-Fire Version
132
+ ```text
133
+ Run the universal installer for AgenticWorkflow (`curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/agentic-workflow/main/install.sh | bash`), link CLI to PATH, run `agentic-workflow init` to configure SOT runtime and supportive tools (Ponytail, TOON, Fable, Caveman), and run `agentic-workflow validate` to confirm 100% readiness. Report the final status table when done.
134
+ ```
135
+
136
+ </details>
137
+
138
+ ### 2. Agent Skill Hubs (Zero-Install Agent Registration)
139
+
140
+ ```bash
141
+ # Skills.sh / Vercel Ecosystem (Any Agent)
142
+ npx skills add imMamdouhaboammar/agentic-workflow
143
+
144
+ # Universal One-Line Installer (Claude, Gemini, Cursor, Codex, OpenCode)
145
+ curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/agentic-workflow/main/install.sh | bash
146
+ ```
147
+
148
+ ### 3. Package Managers (CLI & SDK)
149
+
150
+ | Registry / Host | Command | Usage |
151
+ |---|---|---|
152
+ | **Bun (Instant CLI)** | `bunx @mamdouh-aboammar/agentic-workflow [command]` | Zero-install CLI execution |
153
+ | **Bun (Library)** | `bun add @mamdouh-aboammar/agentic-workflow` | TypeScript / Bun SDK dependency |
154
+ | **npm / npx (Node)** | `npx @mamdouh-aboammar/agentic-workflow [command]` | Zero-install Node CLI execution |
155
+ | **npm (Library)** | `npm install @mamdouh-aboammar/agentic-workflow` | Node.js ESM library dependency |
156
+ | **PyPI (Python)** | `pip install agenticworkflow` | Python library & console script |
157
+ | **Homebrew (macOS/Linux)** | `brew install imMamdouhaboammar/tap/agentic-workflow` | System binary via Homebrew |
158
+ | **Docker Container** | `docker run -it ghcr.io/immamdouhaboammar/agentic-workflow` | Isolated, containerized runner |
159
+
160
+ ---
161
+
162
+ ## ⚡ Why AgenticWorkflow Exists
163
+
164
+ Most AI workflows fail in production due to three compounding traps:
165
+ 1. **Hallucinated Progress**: Agents mark tasks complete without verifying actual deliverables on disk.
166
+ 2. **Context Amnesia**: Sessions reset or compact, losing critical context and historical failures.
167
+ 3. **Unchecked Drift**: Multi-agent swarms mutate shared state simultaneously, causing race conditions and logic divergence.
168
+
169
+ AgenticWorkflow eliminates these failure modes with a 2-stage execution model backed by deterministic Python and TypeScript safety rails:
170
+
171
+ ```mermaid
172
+ flowchart LR
173
+ Phase1["Phase 1: Workflow Design (workflow.md blueprint)"] --> Phase2["Phase 2: Workflow Implementation (Executing Autonomous System)"]
174
+ ```
175
+
176
+ Creating `workflow.md` is only half the journey. **The ultimate goal is that the workflow executes reliably and produces verified deliverables.**
177
+
178
+ ---
179
+
180
+ ## 🏛️ 3-Stage Core Architecture
181
+
182
+ Every workflow strictly follows three sequential stages:
183
+
184
+ ```mermaid
185
+ graph TD
186
+ subgraph ResearchStage ["1. Research Stage"]
187
+ R1["Information Gathering"] --> R2["Domain Analysis & Fact Verification"]
188
+ end
189
+
190
+ subgraph PlanningStage ["2. Planning Stage"]
191
+ P1["State Formulation (state.yaml SOT)"] --> P2["Human / Autopilot Review & Approval"]
192
+ end
193
+
194
+ subgraph ImplementationStage ["3. Implementation Stage"]
195
+ I1["Autonomous Execution & Tool Orchestration"] --> I2["4-Layer Quality Gates & Final Deliverables"]
196
+ end
197
+
198
+ ResearchStage --> PlanningStage
199
+ PlanningStage --> ImplementationStage
200
+ ```
201
+
202
+ 1. **Research** — Information gathering, competitive benchmarking, and deep domain analysis.
203
+ 2. **Planning** — Architecture blueprint formulation, task decomposition, and human/autopilot sign-off.
204
+ 3. **Implementation** — Multi-agent tool execution, code generation, and artifact verification.
205
+
206
+ ---
207
+
208
+ ## 🛡️ 4-Layer Quality Assurance Stack
209
+
210
+ Every step completion must pass up to 4 verification layers before the Orchestrator advances the Single Source of Truth (`state.yaml`):
211
+
212
+ ```mermaid
213
+ flowchart TD
214
+ StepRun["Agent Executes Step Task"] --> L0["L0: Anti-Skip Physical Guard (File exists & >= 100 bytes)"]
215
+ L0 -->|"PASS"| L1["L1: Verification Gate (100% functional goal achievement)"]
216
+ L0 -->|"FAIL"| Retry["Deterministic Retry / Diagnosis"]
217
+ L1 -->|"PASS"| L15["L1.5: pACS Self-Rating (F/C/L Pre-mortem scoring)"]
218
+ L1 -->|"FAIL"| Retry
219
+ L15 -->|"RED: <50"| Retry
220
+ L15 -->|"GREEN / YELLOW"| L2["L2: Adversarial Review (@reviewer + @fact-checker)"]
221
+ L2 -->|"PASS"| SOTUpdate["Update SOT state.yaml (current_step + 1)"]
222
+ L2 -->|"FAIL"| AbductiveDiag["Abductive Diagnosis (diagnose_context.py)"]
223
+ AbductiveDiag --> Retry
224
+ ```
225
+
226
+ | Layer | Gate Name | Target Verified | Mechanism |
227
+ |---|---|---|---|
228
+ | **L0** | Anti-Skip Guard | Physical deliverable exists and size $\ge 100$ bytes | Deterministic Python hook |
229
+ | **L1** | Verification Gate | 100% achievement of declared task acceptance criteria | Semantic agent self-verification |
230
+ | **L1.5** | pACS Calibration | 3D confidence scoring (Faithfulness, Completeness, Logic) | Pre-mortem protocol ($\min(F, C, L)$) |
231
+ | **L2** | Adversarial Review | Independent critique, claim audit, and web fact-checking | `@reviewer` + `@fact-checker` subagents |
232
+
233
+ ---
234
+
235
+ ## 💻 Dual-Language SDK Usage
236
+
237
+ ### TypeScript & Bun (`npm install agentic-workflow` or `bun add agentic-workflow`)
238
+
239
+ ```typescript
240
+ import {
241
+ AutopilotEngine,
242
+ HookDispatcher,
243
+ IntegrationInstaller,
244
+ encodeToon,
245
+ calculateTokenSavings
246
+ } from 'agentic-workflow';
247
+
248
+ // 1. Token-Oriented Object Notation (v4.1) compression
249
+ const data = {
250
+ users: [
251
+ { id: 1, name: "Alice", role: "architect" },
252
+ { id: 2, name: "Bob", role: "reviewer" }
253
+ ]
254
+ };
255
+ const toonData = encodeToon(data);
256
+ console.log(`Compressed TOON:\n${toonData}`);
257
+
258
+ // 2. Hook Dispatcher evaluation
259
+ const dispatcher = new HookDispatcher(process.cwd());
260
+ const check = dispatcher.dispatch({
261
+ event_id: "evt_1",
262
+ source: "cli",
263
+ hook_type: "pre_command",
264
+ timestamp: Date.now(),
265
+ command: "git status"
266
+ });
267
+ console.log(`Hook verdict: ${check.verdict}`);
268
+ ```
269
+
270
+ ### Python (`pip install agentic-workflow`)
271
+
272
+ ```python
273
+ from agentic_workflow import (
274
+ AutopilotEngine,
275
+ HookDispatcher,
276
+ IntegrationInstaller,
277
+ CleanCodeChecker,
278
+ MultiAgentManager
279
+ )
280
+
281
+ # 1. Launch Autopilot Engine
282
+ engine = AutopilotEngine(project_dir=".", auto_approve=True)
283
+ engine.plan_default_workflow(
284
+ title="Data Ingestion Pipeline",
285
+ goal="Autonomous end-to-end data ingestion with quality gates"
286
+ )
287
+ success = engine.run_all()
288
+
289
+ # 2. Check Supportive Tools Status
290
+ installer = IntegrationInstaller(project_dir=".")
291
+ results = installer.check_all()
292
+ for r in results:
293
+ print(f"- {r.name}: {r.status}")
294
+ ```
295
+
296
+ ---
297
+
298
+ ## ⚙️ CLI Reference
299
+
300
+ ```bash
301
+ # Launch autonomous end-to-end autopilot workflow with self-fueling & energy management
302
+ agentic-workflow autopilot --title "Production Pipeline" --goal "Autonomous Delivery"
303
+
304
+ # Run Clean Code Guard audit pass (SOLID, 24 Imperatives, AI failure modes)
305
+ agentic-workflow guard [directory]
306
+
307
+ # Execute AI Engineer fairness, drift, and prompt-injection evaluation gates
308
+ agentic-workflow eval
309
+
310
+ # Query multi-agent observable trace logs and spans
311
+ agentic-workflow traces
312
+
313
+ # Manage supportive tools (Ponytail, TOON, Fable, Caveman) & lifecycle
314
+ agentic-workflow integrations status
315
+ agentic-workflow integrations install
316
+ agentic-workflow integrations phase planning
317
+
318
+ # Token-Oriented Object Notation (v4.1) benchmarks and conversion
319
+ agentic-workflow toon benchmark
320
+ agentic-workflow toon convert <file.json>
321
+
322
+ # Initialize infrastructure, SOT runtime directories, and supportive tools
323
+ agentic-workflow init
324
+
325
+ # Validate workflow.md, SOT schema, and pACS integrity
326
+ agentic-workflow validate
327
+
328
+ # Check current workflow progress and observability dashboard
329
+ agentic-workflow status
330
+
331
+ # Run full automated test suite (16 suites: safety, guard, MAS, engines, integrations)
332
+ agentic-workflow test
333
+ ```
334
+
335
+ ---
336
+
337
+ ## 🧰 Supportive Tools Ecosystem
338
+
339
+ AgenticWorkflow automatically provisions and directs specialized supportive tools across its execution phases without manual user overhead:
340
+
341
+ | Supportive Tool | Role & Category | Designated Lifecycle Phase |
342
+ |---|---|---|
343
+ | **[Ponytail](https://github.com/DietrichGebert/ponytail)** | **Simplicity Governor & Anti-Debt** | **Planning & Implementation**: Enforces YAGNI ladder, stdlib-first, and shortest working surgical diffs. |
344
+ | **[TOON](https://github.com/toon-format/toon)** | **Token-Oriented Object Notation (v4.1)** | **Continuous Data Protocol**: Cuts structured data and state tokens by 30-60% across all deliverables and logs. |
345
+ | **[Fable](https://github.com/imMamdouhaboammar/get-fable)** | **Lifecycle Harness & Continuation** | **Execution & Handoff**: Arms circuit breakers (halts on failure streak $\ge 2$) and generates durable continuation state (`.fable/`). |
346
+ | **[Caveman](https://github.com/JuliusBrussee/caveman)** | **Terse Communication Mode** | **Continuous Protocol**: Strips conversational fluff to cut output tokens by 65-75% while keeping code and errors exact. |
347
+
348
+ ---
349
+
350
+ ## 📜 Absolute Criteria (Canon)
351
+
352
+ These constitutional rules govern every design, execution, and modification decision:
353
+
354
+ 1. **Absolute Criterion 1: Quality of the Final Deliverable**
355
+ > Speed, token cost, workload, and length limits are completely ignored. The sole criterion for every decision is the **quality of the final deliverable**.
356
+ 2. **Absolute Criterion 2: Single-File SOT + Hierarchical Memory**
357
+ > All shared workflow state is concentrated in a single file (`state.yaml`). Write permission belongs exclusively to the Orchestrator / Team Lead. Parallel agents never mutate shared files simultaneously.
358
+ 3. **Absolute Criterion 3: Code Change Protocol (CCP)**
359
+ > Before writing, modifying, adding, or deleting code, you must perform **Step 1 (Understand Intent) → Step 2 (Ripple Effect Analysis) → Step 3 (Change Plan)**. Governed by Coding Anchor Points (CAP-1~4).
360
+
361
+ ---
362
+
363
+ ## 📖 Documentation Roadmap
364
+
365
+ 1. **README.md** (This document) — High-level bird's-eye overview and distribution hub.
366
+ 2. [`soul.md`](soul.md) — The philosophical core and DNA inheritance principles.
367
+ 3. [`AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md`](AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md) — Architectural design and theoretical foundations.
368
+ 4. [`DECISION-LOG.md`](DECISION-LOG.md) — Complete historical record of architectural decisions (ADRs).
369
+ 5. [`AGENTICWORKFLOW-USER-MANUAL.md`](AGENTICWORKFLOW-USER-MANUAL.md) — Practical step-by-step operating instructions.
370
+ 6. [`AGENTS.md`](AGENTS.md) — Universal directive and constitutional rules.
371
+ 7. [`docs/protocols/`](docs/protocols/) — Deep-dive execution protocols.
372
+
373
+ ---
374
+
375
+ ## 📄 License
376
+
377
+ MIT License © 2026 Mamdouh Aboammar & Yoonsik Choi. All rights reserved.