@mamdouh-aboammar/agentic-workflow 1.2.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 (118) hide show
  1. package/.claude-plugin/plugin.json +10 -0
  2. package/.codex-plugin/plugin.json +13 -0
  3. package/.skills.json +19 -0
  4. package/AGENTS.md +1344 -0
  5. package/CLAUDE.md +178 -0
  6. package/GEMINI.md +102 -0
  7. package/LICENSE +21 -0
  8. package/README.md +350 -0
  9. package/SKILL.md +132 -0
  10. package/bin/agentic-hooks.sh +79 -0
  11. package/bin/cli.js +1060 -0
  12. package/core/__init__.py +52 -0
  13. package/core/ai_evaluator.py +117 -0
  14. package/core/autopilot_engine.py +368 -0
  15. package/core/clean_code_guard.py +188 -0
  16. package/core/engine_py/__init__.py +29 -0
  17. package/core/engine_py/agent_worker.py +136 -0
  18. package/core/engine_py/decider.py +150 -0
  19. package/core/engine_py/energy.py +45 -0
  20. package/core/engine_py/event_bus.py +63 -0
  21. package/core/engine_py/executor.py +186 -0
  22. package/core/engine_py/models.py +193 -0
  23. package/core/engine_py/queue.py +314 -0
  24. package/core/engine_py/runner.py +116 -0
  25. package/core/engine_py/system_workers.py +70 -0
  26. package/core/engine_py/toon_adapter.py +586 -0
  27. package/core/engine_py/verification_controller.py +208 -0
  28. package/core/engine_py/worker.py +167 -0
  29. package/core/engine_spec/event_schema.json +65 -0
  30. package/core/engine_spec/example_workflow.yaml +73 -0
  31. package/core/engine_spec/workflow_schema.json +127 -0
  32. package/core/hooks/__init__.py +29 -0
  33. package/core/hooks/adapters/__init__.py +25 -0
  34. package/core/hooks/adapters/claude_adapter.py +83 -0
  35. package/core/hooks/adapters/cli_agent_adapter.py +82 -0
  36. package/core/hooks/adapters/codex_adapter.py +78 -0
  37. package/core/hooks/adapters/cursor_adapter.py +73 -0
  38. package/core/hooks/adapters/gemini_adapter.py +93 -0
  39. package/core/hooks/adapters/homebrew_adapter.py +69 -0
  40. package/core/hooks/adapters/mcp_proxy.py +133 -0
  41. package/core/hooks/adapters/shell_adapter.py +65 -0
  42. package/core/hooks/dispatcher.py +118 -0
  43. package/core/hooks/policy_engine.py +375 -0
  44. package/core/hooks/session_end.py +141 -0
  45. package/core/hooks/types.py +147 -0
  46. package/core/integrations/__init__.py +28 -0
  47. package/core/integrations/installer.py +225 -0
  48. package/core/integrations/lifecycle_director.py +175 -0
  49. package/core/integrations/registry.py +105 -0
  50. package/core/multi_agent_system.py +164 -0
  51. package/core/skills_indexer.py +742 -0
  52. package/core/system/__init__.py +25 -0
  53. package/core/system/announcements.py +72 -0
  54. package/core/system/dependencies.py +69 -0
  55. package/core/system/doctor.py +171 -0
  56. package/core/system/health.py +144 -0
  57. package/core/system/installer.py +137 -0
  58. package/core/system/notifications.py +97 -0
  59. package/core/system/refresher.py +110 -0
  60. package/core/system/updater.py +167 -0
  61. package/core/system/version_tracker.py +65 -0
  62. package/docs/architecture_plan.md +7 -0
  63. package/docs/guides/failure-recovery.md +714 -0
  64. package/docs/implementation_summary.md +10 -0
  65. package/docs/protocols/autopilot-execution.md +148 -0
  66. package/docs/protocols/code-change-protocol.md +49 -0
  67. package/docs/protocols/context-preservation-detail.md +114 -0
  68. package/docs/protocols/quality-gates.md +110 -0
  69. package/docs/protocols/ulw-mode.md +60 -0
  70. package/docs/research_findings.md +10 -0
  71. package/docs/solutions/autonomous-autopilot-engine-architecture.md +38 -0
  72. package/install.sh +111 -0
  73. package/marketplace.json +37 -0
  74. package/package.json +81 -0
  75. package/skills/agentic-workflow/SKILL.md +132 -0
  76. package/skills/agentic-workflow/skill-spec.json +100 -0
  77. package/soul.md +445 -0
  78. package/src/engine_ts/decider.ts +186 -0
  79. package/src/engine_ts/event-bus.ts +57 -0
  80. package/src/engine_ts/executor.ts +262 -0
  81. package/src/engine_ts/index.ts +12 -0
  82. package/src/engine_ts/queue.ts +93 -0
  83. package/src/engine_ts/runner.ts +108 -0
  84. package/src/engine_ts/skills-indexer.ts +264 -0
  85. package/src/engine_ts/toon-adapter.ts +91 -0
  86. package/src/engine_ts/types.ts +134 -0
  87. package/src/engine_ts/verification-controller.ts +204 -0
  88. package/src/engine_ts/worker.ts +280 -0
  89. package/src/hooks/adapters/claude-adapter.ts +54 -0
  90. package/src/hooks/adapters/cli-agent-adapter.ts +46 -0
  91. package/src/hooks/adapters/codex-adapter.ts +69 -0
  92. package/src/hooks/adapters/cursor-adapter.ts +60 -0
  93. package/src/hooks/adapters/gemini-adapter.ts +71 -0
  94. package/src/hooks/adapters/homebrew-adapter.ts +36 -0
  95. package/src/hooks/adapters/mcp-proxy.ts +66 -0
  96. package/src/hooks/adapters/shell-adapter.ts +42 -0
  97. package/src/hooks/dispatcher.ts +113 -0
  98. package/src/hooks/index.ts +16 -0
  99. package/src/hooks/policy-engine.ts +376 -0
  100. package/src/hooks/session-end.ts +125 -0
  101. package/src/hooks/types.ts +61 -0
  102. package/src/index.d.ts +34 -0
  103. package/src/index.ts +23 -0
  104. package/src/integrations/index.ts +7 -0
  105. package/src/integrations/installer.ts +208 -0
  106. package/src/integrations/lifecycle-director.ts +139 -0
  107. package/src/integrations/registry.ts +82 -0
  108. package/src/system/announcements.ts +143 -0
  109. package/src/system/dependencies.ts +176 -0
  110. package/src/system/doctor.ts +374 -0
  111. package/src/system/health.ts +270 -0
  112. package/src/system/index.ts +14 -0
  113. package/src/system/installer.ts +262 -0
  114. package/src/system/notifications.ts +180 -0
  115. package/src/system/refresher.ts +207 -0
  116. package/src/system/types.ts +268 -0
  117. package/src/system/updater.ts +219 -0
  118. package/src/system/version-tracker.ts +137 -0
package/CLAUDE.md ADDED
@@ -0,0 +1,178 @@
1
+ # AgenticWorkflow
2
+
3
+ Claude Code-based agent workflow automation project.
4
+
5
+ ## Final Goal
6
+
7
+ 1. **Workflow Design**: Systematically design complex tasks into a 3-stage `workflow.md` (Research → Planning → Implementation).
8
+ 2. **Workflow Execution**: Actually implement the agents, scripts, and automation pipeline configured in `workflow.md`.
9
+
10
+ > Designing `workflow.md` is an intermediate blueprint. **Ensuring the workflow actually executes and produces verified deliverables** is the final goal.
11
+
12
+ ### Purpose of Existence — DNA Inheritance
13
+
14
+ AgenticWorkflow is a **parent organism that gives birth to child agentic workflow systems**. The `workflow-generator` skill serves as the production line, and every child system **structurally embeds** the parent genome (Constitution, Structure, Verification, Safety, Memory, Adversarial Criticism, and Transparency). Details: `soul.md §0`.
15
+
16
+ ## Absolute Criteria
17
+
18
+ > The top-level rules applied to every design, implementation, and modification decision. These supersede all guidelines and principles below.
19
+
20
+ ### Absolute Criterion 1: Quality of the Final Deliverable
21
+ > **Speed, token cost, workload, and length limits are completely ignored.** The sole criterion for every decision is the **quality of the final deliverable**.
22
+
23
+ ### Absolute Criterion 2: Single-File SOT + Hierarchical Memory Structure
24
+ > All shared state is concentrated in a single file (`state.yaml`). SOT write permission belongs exclusively to the Orchestrator / Team Lead. Concurrent modification of the same file by parallel agents is strictly prohibited.
25
+
26
+ ### Absolute Criterion 3: Code Change Protocol (CCP)
27
+ > Before writing, modifying, adding, or deleting code, you must internally perform **Step 1 (Understand Intent) → Step 2 (Ripple Effect Analysis) → Step 3 (Change Plan)**. Analysis depth scales with change scope. **Details**: `docs/protocols/code-change-protocol.md`.
28
+
29
+ **Coding Anchor Points (CAP)**: CAP-1 (Think Before Coding), CAP-2 (Simplicity First), CAP-3 (Goal-Based Execution), CAP-4 (Surgical Changes). When conflicting with Absolute Criterion 1, Quality always wins.
30
+
31
+ ### Priority Among Absolute Criteria
32
+ > **Absolute Criterion 1 (Quality) is paramount.** Absolute Criterion 2 (SOT) and Absolute Criterion 3 (CCP) are co-equal means to guarantee quality.
33
+
34
+ ### TOON Style Enforcement (v4.1)
35
+ > **All agents and Claude sessions MUST enforce TOON (Token-Oriented Object Notation v4.1) on structured responses, dialogues, and deliverables**, achieving 30–60% token savings over JSON/markdown tables. Reference: `AGENTS.md §5.7`.
36
+
37
+ ---
38
+
39
+ ## Project Structure
40
+
41
+ ```
42
+ AgenticWorkflow/
43
+ ├── CLAUDE.md ← This file (Claude Code directive — lightweight TOC)
44
+ ├── AGENTS.md ← Universal AI agent common directive (Hub — methodology SOT)
45
+ ├── GEMINI.md ← Gemini CLI / Antigravity directive (Spoke)
46
+ ├── soul.md ← DNA inheritance definition
47
+ ├── DECISION-LOG.md ← Architecture Decision Records (ADR, 51+ records)
48
+ ├── AGENTICWORKFLOW-USER-MANUAL.md ← User manual
49
+ ├── AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md ← Design philosophy and architectural bird's-eye view
50
+ ├── docs/protocols/ ← Detailed protocols (on-demand references)
51
+ │ ├── autopilot-execution.md (Workflow execution checklist + NEVER DO)
52
+ │ ├── quality-gates.md (L0-L2 4-layer + P1 14-item validation details)
53
+ │ ├── ulw-mode.md (ULW 3 intensifier rules + runtime mechanics)
54
+ │ ├── context-preservation-detail.md (Hook internal mechanics + D-7 instances)
55
+ │ └── code-change-protocol.md (CCP 3 steps + CAP + Proportionality Rule)
56
+ ├── .claude/
57
+ │ ├── settings.json ← Hook configuration
58
+ │ ├── agents/
59
+ │ │ ├── translator.md (Terminology consistency specialist)
60
+ │ │ ├── reviewer.md (Adversarial reviewer, Enhanced L2)
61
+ │ │ └── fact-checker.md (Fact-checker, claim-by-claim verification)
62
+ │ ├── commands/
63
+ │ │ ├── install.md (/install — Setup Init validation)
64
+ │ │ └── maintenance.md (/maintenance — Health check)
65
+ │ ├── hooks/scripts/ ← Hook + validation scripts
66
+ │ │ ├── context_guard.py (Unified dispatcher)
67
+ │ │ ├── _context_lib.py (Shared library — parsing, generation, validation, compression)
68
+ │ │ ├── save_context.py (SessionEnd/PreCompact snapshot persistence)
69
+ │ │ ├── restore_context.py (SessionStart restore + RLM pointers)
70
+ │ │ ├── update_work_log.py (PostToolUse 9 tools tracking)
71
+ │ │ ├── generate_context_summary.py (Stop incremental snapshot + safety net)
72
+ │ │ ├── diagnose_context.py (Abductive Diagnosis pre-analysis)
73
+ │ │ ├── validate_diagnosis.py (AD1-AD10 post-validation)
74
+ │ │ ├── validate_pacs.py (PA1-PA7 + L0 validation)
75
+ │ │ ├── validate_review.py (R1-R5 review validation)
76
+ │ │ ├── validate_traceability.py (CT1-CT5 traceability validation)
77
+ │ │ ├── validate_domain_knowledge.py (DK1-DK7 domain knowledge validation)
78
+ │ │ ├── validate_translation.py (T1-T9 translation & glossary validation)
79
+ │ │ ├── validate_verification.py (V1a-V1c verification log validation)
80
+ │ │ ├── validate_workflow.py (W1-W8 DNA inheritance validation)
81
+ │ │ ├── validate_retry_budget.py (RB1-RB3 retry budget decision)
82
+ │ │ ├── setup_init.py (Infrastructure health check + SOT write pattern check)
83
+ │ │ ├── setup_maintenance.py (Periodic health check + doc-code sync)
84
+ │ │ ├── block_destructive_commands.py (Dangerous command blocking: network/system/git/rm, exit 2)
85
+ │ │ ├── block_test_file_edit.py (TDD Guard, .tdd-guard toggle)
86
+ │ │ ├── predictive_debug_guard.py (Risk file warning based on error history, exit 0)
87
+ │ │ ├── output_secret_filter.py (Secret detection: 3-tier, 25+ regexes, 2-pass scan)
88
+ │ │ ├── security_sensitive_file_guard.py (Security sensitive file modification warning)
89
+ │ │ ├── query_workflow.py (Workflow observability: dashboard/weakest/retry/blocked)
90
+ │ │ ├── _test_secret_filter.py (output_secret_filter tests — 44 cases)
91
+ │ │ ├── _test_sensitive_file_guard.py (security_sensitive_file_guard tests — 44 cases)
92
+ │ │ └── _test_block_destructive.py (block_destructive_commands tests — 43 cases)
93
+ │ ├── context-snapshots/ ← Runtime snapshots (gitignored)
94
+ │ └── skills/
95
+ │ ├── workflow-generator/ (Workflow design & generation skill)
96
+ │ └── doctoral-writing/ (Doctoral academic writing skill)
97
+ ├── translations/glossary.yaml ← Terminology glossary
98
+ ├── prompt/ ← PRD investigation frameworks & agent prompts
99
+ └── coding-resource/ ← Theoretical foundations
100
+ ```
101
+
102
+ ## Context Preservation System
103
+
104
+ An automatic persistence and recovery system that prevents loss of work context upon context token exhaustion, `/clear`, or compaction.
105
+
106
+ | Hook Event | Script | Action |
107
+ |---|---|---|
108
+ | Setup (`--init`) | `setup_init.py` | Infrastructure health check + SOT write safety + runtime directory init |
109
+ | Setup (`--maintenance`) | `setup_maintenance.py` | Periodic health check + doc-code synchronization |
110
+ | PreToolUse (Bash) | `block_destructive_commands.py` | Blocks dangerous commands: network exfil, raw format, git reset/force, rm -rf (exit 2) |
111
+ | PreToolUse (Edit\|Write) | `block_test_file_edit.py` | Protects test files during active TDD Guard (exit 2) |
112
+ | PreToolUse (Edit\|Write) | `predictive_debug_guard.py` | Warns on high-risk files based on past failure history |
113
+ | SessionStart | `restore_context.py` | RLM pointers + past session index + Predictive Debugging risk cache |
114
+ | PostToolUse (9 tools) | `update_work_log.py` | Accumulates granular tool usage logs |
115
+ | PostToolUse (Bash\|Read) | `output_secret_filter.py` | Detects leaked secrets (3-tier extraction, 2-pass scan) |
116
+ | PostToolUse (Edit\|Write) | `security_sensitive_file_guard.py` | Warns on security-sensitive file changes |
117
+ | Stop | `generate_context_summary.py` | Incremental snapshot + Knowledge Archive indexing + safety net |
118
+ | PreCompact | `save_context.py` | Saves full snapshot before context compaction |
119
+ | SessionEnd | `save_context.py` | Saves full snapshot on `/clear` or session exit |
120
+
121
+ **Mandatory Action**: When `[CONTEXT RECOVERY]` appears at session start, **you must read the indicated snapshot file** via Read tool to restore prior working context.
122
+
123
+ **Details**: Hook internal mechanics, Knowledge Archive schema, and D-7 instances → `docs/protocols/context-preservation-detail.md`.
124
+
125
+ ## Skill Invocation Routing
126
+
127
+ | User Request Pattern | Skill | Entry Point |
128
+ |---|---|---|
129
+ | "create workflow", "design automation pipeline", "build workflow" | `workflow-generator` | SKILL.md |
130
+ | "write in doctoral style", "academic writing", "dissertation polish" | `doctoral-writing` | SKILL.md |
131
+
132
+ ## Core Design Principles
133
+
134
+ 1. **P1 — Data Refinement for Accuracy**: Strip noise deterministically via Python code before handing off to AI agents.
135
+ 2. **P2 — Expertise-Based Delegation Structure**: Delegate specialized tasks to domain agents; Orchestrator focuses on coordination.
136
+ 3. **P3 — Resource Accuracy**: Explicit paths for all files, dependencies, and external assets; placeholders are forbidden.
137
+ 4. **P4 — Question Design Rules**: Maximum 4 questions, each with ~3 options. Proceed without questions if unambiguous.
138
+
139
+ ## Autopilot Mode
140
+
141
+ Autonomous execution mode that auto-approves `(human)` review stages and questions. Details: `AGENTS.md §5.1`.
142
+
143
+ **4-Layer Quality Assurance**: L0 (Anti-Skip Guard) → L1 (Verification Gate) → L1.5 (pACS Self-Scoring) → L2 (Adversarial Review). Details: `docs/protocols/quality-gates.md`.
144
+
145
+ **Required Reading Before Execution**: `docs/protocols/autopilot-execution.md` — step-by-step checklist and NEVER DO rules.
146
+
147
+ ## ULW (Ultrawork) Mode
148
+
149
+ Activated whenever `ulw` is present in the prompt. Acts as an **intensity overlay on rigor**. Orthogonal to Autopilot. 3 Intensifiers: I-1 (Sisyphus Persistence), I-2 (Mandatory Task Decomposition), I-3 (Bounded Retry Escalation).
150
+
151
+ **Details**: `docs/protocols/ulw-mode.md`.
152
+
153
+ ## Supportive Tools Ecosystem & Sequential Operational Lifecycle
154
+
155
+ The system automatically provisions and orchestrates supportive tools:
156
+ - **Continuous Layer**: **TOON v4.1** for structured data exchange and **Caveman** mode for concise, zero-slop agent reasoning and logs.
157
+ - **Phase 2 (Architecture & Planning)**: **Ponytail YAGNI Ladder** (Rung 1-3: question speculative code, stdlib-first, reuse existing patterns) + **Fable Plan**.
158
+ - **Phase 3 (Implementation)**: **Ponytail Surgical Diffs** (Rung 4-7: fewest files, shortest diff, root cause fix) + **Fable Circuit Breaker** (halt if failure streak >= 2).
159
+ - **Phase 4 (Verification)**: Clean Code Guard + Ponytail Anti-Debt audit + L0-L2 quality gates.
160
+ - **Phase 5 (Handoff)**: Compact session into durable continuation state (`.fable/state.json`, `.fable/PROGRESS.md`).
161
+
162
+ Details: `AGENTS.md §5.8`.
163
+
164
+ ## Language and Style Rules
165
+
166
+ - **Framework Documentation & User Dialogue**: Pure English
167
+ - **Workflow Execution**: Pure English (maximizes AI reasoning capability — Absolute Criterion 1)
168
+ - **Deliverables**: English primary deliverables
169
+ - **Technical Terminology**: Maintain standard English terms (SOT, Agent Team, Hooks, pACS, etc.)
170
+ - **Visualization**: Prefer clean Mermaid diagrams with quoted labels
171
+ - **Depth**: Comprehensive, data-backed exposition over superficial summaries
172
+
173
+ ## Skill Development Rules
174
+
175
+ 1. **Embed all Absolute Criteria** — contextualized for the target domain.
176
+ 2. **Strict division of file responsibilities** — `SKILL.md` (WHY / Routing), `references/` (WHAT / HOW / VERIFY).
177
+ 3. **Explicit conflict resolution scenarios** among Absolute Criteria.
178
+ 4. Always reflect and audit against the Absolute Criteria after any modification.
package/GEMINI.md ADDED
@@ -0,0 +1,102 @@
1
+ # AgenticWorkflow — Gemini CLI Directive
2
+
3
+ > All AI agents working on this project must follow the AgenticWorkflow methodology.
4
+
5
+ ## Essential References
6
+
7
+ @AGENTS.md
8
+
9
+ The above document defines all Absolute Criteria, design principles, and workflow structures for this project.
10
+ Refer to `AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md` for architectural design and rationale.
11
+ Refer to `DECISION-LOG.md` for historical design decisions (ADRs).
12
+
13
+ ## Genetic Design (DNA Inheritance)
14
+
15
+ This project is a parent organism that births child agentic workflow systems.
16
+ Every child system structurally embeds the parent genome: 3 Absolute Criteria, Single-File SOT, 4-Layer Verification, Safety Hooks, and Memory Systems.
17
+ Details: `soul.md`, `AGENTS.md §1`.
18
+
19
+ ## Absolute Criteria (Core Summary)
20
+
21
+ ### Absolute Criterion 1: Quality of the Final Deliverable
22
+ > Speed, token cost, workload, and length limits are completely ignored.
23
+ > The sole criterion for every decision is the **quality of the final deliverable**.
24
+
25
+ ### Absolute Criterion 2: Single-File SOT
26
+ > All shared state is concentrated in a single file (`state.yaml`). Write permission is held exclusively by the Orchestrator / Team Lead. Parallel agents concurrently modifying the same file is strictly prohibited.
27
+
28
+ ### Absolute Criterion 3: Code Change Protocol (CCP)
29
+ > Before writing, modifying, adding, or deleting code, you must internally perform 3 steps:
30
+ > Step 1: Understand Intent → Step 2: Ripple Effect Analysis → Step 3: Change Plan.
31
+ > Analysis depth scales proportionally with change scope (Minor: Step 1 only, Standard: full 3 steps, Large-scale: full 3 steps + mandatory user approval).
32
+ > **Coding Anchor Points (CAP-1~4)**: Think Before Coding, Simplicity First, Goal-Based Execution, Surgical Changes. Details: `AGENTS.md §2`.
33
+
34
+ ## Basic Workflow Structure
35
+
36
+ Every workflow consists of three stages:
37
+ 1. **Research** — Information gathering and analysis
38
+ 2. **Planning** — Plan formulation, structuring, human review and approval
39
+ 3. **Implementation** — Actual execution and verified deliverable generation
40
+
41
+ ## Gemini CLI Implementation Mapping
42
+
43
+ | AgenticWorkflow Concept | Gemini CLI Implementation |
44
+ |---|---|
45
+ | Specialized Agent (Sub-agent) | Gemini CLI is a single-session model. Simulate domain expertise by switching roles within the prompt or using subagents. |
46
+ | Agent Group (Agent Team) | Parallel Gemini CLI / Antigravity subagent sessions coordinated by Orchestrator. |
47
+ | Automated Verification (Hooks) | External Python and shell scripts executing automated verification pipelines. |
48
+ | Reusable Modules (Skills) | Injected via `@file.md` imports or skills directory. |
49
+ | External Integration (MCP) | Gemini extensions or external API scripts. |
50
+ | SOT State Management | `state.yaml` file — single write point principle applies identically. |
51
+ | Autopilot Mode | Controlled by `autopilot.enabled` field in SOT. Auto-approves `(human)` review steps. Includes Anti-Skip Guard and Decision Logs (`autopilot-logs/`). See `AGENTS.md §5.1`. |
52
+ | ULW (Ultrawork) Mode | Activated when `ulw` is present in prompt. Thoroughness intensity overlay orthogonal to Autopilot. 3 Intensifiers: Sisyphus Persistence (3 retries), Mandatory Task Decomposition, Bounded Retry Escalation. See `AGENTS.md §5.1.1`. |
53
+ | Verification Protocol | Verifies 100% functional goal achievement of step deliverables. Verification Gate layer sitting atop physical Anti-Skip Guard. Retries up to 10 times (15 with ULW). See `AGENTS.md §5.3`. |
54
+ | pACS (Self-Confidence Scoring) | 3-dimensional self-evaluation (Faithfulness, Completeness, Logic) with mandatory Pre-mortem protocol and min-score principle. GREEN (>=70): proceed, YELLOW (50-69): flag and proceed, RED (<50): rework. See `AGENTS.md §5.4`. |
55
+ | Adversarial Review (Enhanced L2) | Independent evaluation replacing legacy calibration. `@reviewer` (critical analysis of code/deliverables, read-only) + `@fact-checker` (external fact verification, web access). P1 validation (`validate_review.py`) ensures review rigor. See `AGENTS.md §5.5`. |
56
+ | Terminology Protocol | Maintains terminology consistency via `translations/glossary.yaml`. Deterministic validation guarantees glossary freshness and integrity. See `AGENTS.md §5.2`. |
57
+ | Predictive Debugging (L-1) | Pre-tool warning on risky files based on error history. `predictive_debug_guard.py` (PreToolUse warning) + `aggregate_risk_scores()` (SessionStart P1 aggregation) + `validate_risk_scores()` (RS1-RS6 validation). Cached in `risk-scores.json`. |
58
+ | Abductive Diagnosis | 3-step structured diagnosis triggered on quality gate failure before retry: Step A: P1 evidence gathering (`diagnose_context.py`), Step B: Multi-hypothesis root cause analysis, Step C: P1 post-validation (`validate_diagnosis.py` AD1-AD10). Recorded in `diagnosis-logs/`. See `AGENTS.md §5.6`. |
59
+ | TOON Protocol (v4.1) | Mandatory Token-Oriented Object Notation for structured outputs, dialogues, logs, and agent payloads. Saves 30-60% tokens. Dual engine adapters (`core/engine_py/toon_adapter.py`, `src/engine_ts/toon-adapter.ts`). See `AGENTS.md §5.7`. |
60
+ | Supportive Tools & Lifecycle Director | Automated provisioning & sequential execution of Ponytail, TOON, Fable, and Caveman without manual user burden. Managed by `LifecycleDirector` and `IntegrationInstaller`. See `AGENTS.md §5.8`. |
61
+
62
+ ## Sequential Operational Lifecycle & Supportive Tools
63
+
64
+ In every Gemini CLI / Antigravity session, the agent operates under the automated guidance of the **Sequential Operational Lifecycle Director**:
65
+ 1. **Continuous Layer**: Enforce **TOON v4.1** for structured data tables/state and **Caveman** mode (terse, zero-slop prose) for internal logs and agent dialogue.
66
+ 2. **Phase 2 (Architecture & Planning)**: Enforce **Ponytail YAGNI Ladder** (Rung 1-3: question speculative requirements, stdlib-first, reuse existing patterns) before finalizing any plan.
67
+ 3. **Phase 3 (Production Implementation)**: Enforce **Ponytail Surgical Diffs** (Rung 4-7: fewest files, shortest diff, root cause fix) + **Fable Circuit Breaker** (halt if failure streak >= 2).
68
+ 4. **Phase 4 (Verification)**: Clean Code Guard + Ponytail Anti-Debt audit + L0-L2 quality gates.
69
+ 5. **Phase 5 (Handoff)**: Compact session into durable continuation state (`.fable/state.json`, `.fable/PROGRESS.md`).
70
+
71
+ ## TOON Response & Conversation Invariant
72
+
73
+ When working within this system, Gemini CLI / Antigravity MUST emit structured information (lists, tables, benchmarks, telemetry, status reports) formatted in **TOON v4.1** syntax instead of verbose JSON or markdown tables to maximize context headroom.
74
+
75
+ ```toon
76
+ tasks[2]{id,agent,status}:
77
+ 1,researcher,completed
78
+ 2,engineer,in_progress
79
+ ```
80
+
81
+ ## Context Preservation
82
+
83
+ In environments without automatic Claude Code hook dispatching:
84
+ - **Manual Snapshot**: Direct the agent to save progress to `context-snapshot.md`.
85
+ - **Session Memory**: Utilize agent memory mechanisms to track core architectural state.
86
+ - **SOT-Based Recovery**: Restore workflow state seamlessly by reading `state.yaml`.
87
+
88
+ ## Core Design Principles
89
+
90
+ - **P1**: Remove noise via deterministic scripts before passing context to AI.
91
+ - **P2**: Maximize quality through specialized delegation.
92
+ - **P3**: Explicit paths for all resources; no placeholders.
93
+ - **P4**: User questions: maximum 4, ~3 options each. If unambiguous, proceed without questions.
94
+
95
+ ## Language and Style Rules
96
+
97
+ - **Framework Documentation & User Dialogue**: Pure English
98
+ - **Workflow Execution**: Pure English (maximizes reasoning performance — Absolute Criterion 1)
99
+ - **Deliverables**: English primary deliverables
100
+ - **Technical Terminology**: Keep standard English terms (SOT, Agent, Orchestrator, Hooks, etc.)
101
+ - **Visualization**: Prefer clean Mermaid diagrams with quoted labels
102
+ - **Depth**: Comprehensive, data-backed exposition over superficial summaries
package/LICENSE ADDED
@@ -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.
package/README.md ADDED
@@ -0,0 +1,350 @@
1
+ <div align="center">
2
+
3
+ # ⚡ AgenticWorkflow ⚡
4
+
5
+ ### Pluripotent Stem-Cell Framework & Universal Agentic Toolchain
6
+ **Deterministic Quality Gates • Multi-Engine Autopilot • Single-File SOT • TOON v4.1 Density**
7
+
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE)
9
+ [![Bun](https://img.shields.io/badge/Runtime-Bun%20%3E%3D1.0-FBF0DF?style=flat-square&logo=bun&logoColor=black)](https://bun.sh)
10
+ [![Python](https://img.shields.io/badge/Python-%3E%3D3.10-3776AB?style=flat-square&logo=python&logoColor=white)](https://python.org)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-3178C6?style=flat-square&logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
12
+ [![npm](https://img.shields.io/badge/npm-agentic--workflow-CB3837?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/agentic-workflow)
13
+ [![PyPI](https://img.shields.io/badge/PyPI-agentic--workflow-3775A9?style=flat-square&logo=pypi&logoColor=white)](https://pypi.org/project/agentic-workflow)
14
+ [![Skills.sh](https://img.shields.io/badge/Skills.sh-Compatible-000000?style=flat-square&logo=vercel&logoColor=white)](https://skills.sh)
15
+ [![Claude Code](https://img.shields.io/badge/Claude%20Code-Certified%20Skill-D97706?style=flat-square&logo=anthropic&logoColor=white)](https://claude.ai)
16
+ [![Cursor](https://img.shields.io/badge/Cursor-Rules%20%26%20Skills-000000?style=flat-square&logo=cursor&logoColor=white)](https://cursor.com)
17
+ [![CI](https://img.shields.io/badge/CI-Passing-10B981?style=flat-square&logo=githubactions&logoColor=white)](https://github.com/imMamdouhaboammar/agentic-workflow/actions)
18
+
19
+ <p align="center">
20
+ <a href="#-universal-installation--quickstart">Quickstart</a> •
21
+ <a href="#1--one-click-agent-self-install--init-prompt">Agent Prompt</a> •
22
+ <a href="#-why-agenticworkflow-exists">Why It Exists</a> •
23
+ <a href="#-architecture">Architecture</a> •
24
+ <a href="#-dual-language-sdk-usage">SDK Usage</a> •
25
+ <a href="#-cli-reference">CLI Reference</a> •
26
+ <a href="#-supportive-tools">Supportive Tools</a> •
27
+ <a href="#-license">License</a>
28
+ </p>
29
+
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## 🚀 Universal Installation & Quickstart
35
+
36
+ AgenticWorkflow is packaged and distributable across every major package registry, AI harness, and container platform:
37
+
38
+ ### 1. 🤖 One-Click Agent Self-Install & Init Prompt
39
+
40
+ 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:
41
+
42
+ <details>
43
+ <summary><b>👉 Click to expand the Smart Agent Prompts (Master Prompt & Quick-Fire)</b></summary>
44
+
45
+ <br>
46
+
47
+ > [!TIP]
48
+ > **Copy & Paste into your Agent Chat:**
49
+
50
+ ````markdown
51
+ You are acting as an autonomous DevOps & Systems Integration Agent.
52
+ Your objective is to install, configure, initialize, and verify the `agentic-workflow` framework in this workspace in a single uninterrupted execution loop.
53
+
54
+ Execute the following 4 phases autonomously:
55
+
56
+ ### Phase 1: Universal Installation
57
+ 1. Detect available runtimes on the system (`python3`, `bun`, `npm`, `curl`, `git`).
58
+ 2. Run the universal one-line installer:
59
+ ```bash
60
+ curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/agentic-workflow/main/install.sh | bash
61
+ ```
62
+ *(Fallback if offline or in a local clone: run `./install.sh` or `bun add -g agentic-workflow` / `npm install -g agentic-workflow`)*.
63
+ 3. Ensure `~/.local/bin` is in `$PATH` so the `agentic-workflow` CLI binary is immediately executable.
64
+
65
+ ### Phase 2: Host & Workspace Configuration
66
+ 1. Detect the current agent harness and verify registration in the appropriate skill directories:
67
+ - Claude Code: `~/.claude/skills/agentic-workflow`
68
+ - Gemini CLI / Antigravity: `~/.gemini/config/skills/agentic-workflow`
69
+ - Cursor: `~/.cursor/skills/agentic-workflow`
70
+ - Codex / OpenCode: `~/.codex/skills/agentic-workflow`
71
+ - Universal Agent Kernel: `~/.agents/skills/agentic-workflow`
72
+ 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:
73
+ - Absolute Criterion 1: Deliverable Quality over speed/token cost.
74
+ - Absolute Criterion 2: Single-File SOT (`state.yaml`) with single-writer lock.
75
+ - Absolute Criterion 3: Code Change Protocol (CCP: Understand Intent → Ripple Effect Analysis → Step Plan).
76
+ - 4-Layer Quality Assurance: L0 Anti-Skip → L1 Verification → L1.5 pACS Pre-mortem scoring → L2 Adversarial Review.
77
+ 3. Provision supportive tools by running:
78
+ ```bash
79
+ agentic-workflow integrations install
80
+ ```
81
+ Confirm integration of Ponytail (YAGNI & surgical diffs), TOON v4.1 (token compression), Fable (circuit breaker), and Caveman (concise mode).
82
+
83
+ ### Phase 3: Initialization (`init`)
84
+ 1. Run the native initialization command:
85
+ ```bash
86
+ agentic-workflow init
87
+ ```
88
+ 2. Confirm that:
89
+ - Runtime directories (`context-snapshots/`, `autopilot-logs/`, `diagnosis-logs/`) are generated.
90
+ - Core hook scripts in `.claude/hooks/scripts/` have validated syntax and execution permissions.
91
+ - The skills mesh index (`core/skills_indexer.py`) is indexed and queryable.
92
+
93
+ ### Phase 4: Validation & Status Report
94
+ 1. Verify the setup by running:
95
+ ```bash
96
+ agentic-workflow validate
97
+ agentic-workflow integrations status
98
+ ```
99
+ 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.
100
+
101
+ Proceed and execute all steps now without stopping for manual input.
102
+ ````
103
+
104
+ #### ⚡ Quick-Fire Version
105
+ ```text
106
+ 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.
107
+ ```
108
+
109
+ </details>
110
+
111
+ ### 2. Agent Skill Hubs (Zero-Install Agent Registration)
112
+
113
+ ```bash
114
+ # Skills.sh / Vercel Ecosystem (Any Agent)
115
+ npx skills add imMamdouhaboammar/agentic-workflow
116
+
117
+ # Universal One-Line Installer (Claude, Gemini, Cursor, Codex, OpenCode)
118
+ curl -fsSL https://raw.githubusercontent.com/imMamdouhaboammar/agentic-workflow/main/install.sh | bash
119
+ ```
120
+
121
+ ### 3. Package Managers (CLI & SDK)
122
+
123
+ | Registry / Host | Command | Usage |
124
+ |---|---|---|
125
+ | **Bun (Instant CLI)** | `bunx @mamdouh-aboammar/agentic-workflow [command]` | Zero-install CLI execution |
126
+ | **Bun (Library)** | `bun add @mamdouh-aboammar/agentic-workflow` | TypeScript / Bun SDK dependency |
127
+ | **npm / npx (Node)** | `npx @mamdouh-aboammar/agentic-workflow [command]` | Zero-install Node CLI execution |
128
+ | **npm (Library)** | `npm install @mamdouh-aboammar/agentic-workflow` | Node.js ESM library dependency |
129
+ | **PyPI (Python)** | `pip install agenticworkflow` | Python library & console script |
130
+ | **Homebrew (macOS/Linux)** | `brew install imMamdouhaboammar/tap/agentic-workflow` | System binary via Homebrew |
131
+ | **Docker Container** | `docker run -it ghcr.io/immamdouhaboammar/agentic-workflow` | Isolated, containerized runner |
132
+
133
+ ---
134
+
135
+ ## ⚡ Why AgenticWorkflow Exists
136
+
137
+ Most AI workflows fail in production due to three compounding traps:
138
+ 1. **Hallucinated Progress**: Agents mark tasks complete without verifying actual deliverables on disk.
139
+ 2. **Context Amnesia**: Sessions reset or compact, losing critical context and historical failures.
140
+ 3. **Unchecked Drift**: Multi-agent swarms mutate shared state simultaneously, causing race conditions and logic divergence.
141
+
142
+ AgenticWorkflow eliminates these failure modes with a 2-stage execution model backed by deterministic Python and TypeScript safety rails:
143
+
144
+ ```mermaid
145
+ flowchart LR
146
+ Phase1["Phase 1: Workflow Design (workflow.md blueprint)"] --> Phase2["Phase 2: Workflow Implementation (Executing Autonomous System)"]
147
+ ```
148
+
149
+ Creating `workflow.md` is only half the journey. **The ultimate goal is that the workflow executes reliably and produces verified deliverables.**
150
+
151
+ ---
152
+
153
+ ## 🏛️ 3-Stage Core Architecture
154
+
155
+ Every workflow strictly follows three sequential stages:
156
+
157
+ ```mermaid
158
+ graph TD
159
+ subgraph ResearchStage ["1. Research Stage"]
160
+ R1["Information Gathering"] --> R2["Domain Analysis & Fact Verification"]
161
+ end
162
+
163
+ subgraph PlanningStage ["2. Planning Stage"]
164
+ P1["State Formulation (state.yaml SOT)"] --> P2["Human / Autopilot Review & Approval"]
165
+ end
166
+
167
+ subgraph ImplementationStage ["3. Implementation Stage"]
168
+ I1["Autonomous Execution & Tool Orchestration"] --> I2["4-Layer Quality Gates & Final Deliverables"]
169
+ end
170
+
171
+ ResearchStage --> PlanningStage
172
+ PlanningStage --> ImplementationStage
173
+ ```
174
+
175
+ 1. **Research** — Information gathering, competitive benchmarking, and deep domain analysis.
176
+ 2. **Planning** — Architecture blueprint formulation, task decomposition, and human/autopilot sign-off.
177
+ 3. **Implementation** — Multi-agent tool execution, code generation, and artifact verification.
178
+
179
+ ---
180
+
181
+ ## 🛡️ 4-Layer Quality Assurance Stack
182
+
183
+ Every step completion must pass up to 4 verification layers before the Orchestrator advances the Single Source of Truth (`state.yaml`):
184
+
185
+ ```mermaid
186
+ flowchart TD
187
+ StepRun["Agent Executes Step Task"] --> L0["L0: Anti-Skip Physical Guard (File exists & >= 100 bytes)"]
188
+ L0 -->|"PASS"| L1["L1: Verification Gate (100% functional goal achievement)"]
189
+ L0 -->|"FAIL"| Retry["Deterministic Retry / Diagnosis"]
190
+ L1 -->|"PASS"| L15["L1.5: pACS Self-Rating (F/C/L Pre-mortem scoring)"]
191
+ L1 -->|"FAIL"| Retry
192
+ L15 -->|"RED: <50"| Retry
193
+ L15 -->|"GREEN / YELLOW"| L2["L2: Adversarial Review (@reviewer + @fact-checker)"]
194
+ L2 -->|"PASS"| SOTUpdate["Update SOT state.yaml (current_step + 1)"]
195
+ L2 -->|"FAIL"| AbductiveDiag["Abductive Diagnosis (diagnose_context.py)"]
196
+ AbductiveDiag --> Retry
197
+ ```
198
+
199
+ | Layer | Gate Name | Target Verified | Mechanism |
200
+ |---|---|---|---|
201
+ | **L0** | Anti-Skip Guard | Physical deliverable exists and size $\ge 100$ bytes | Deterministic Python hook |
202
+ | **L1** | Verification Gate | 100% achievement of declared task acceptance criteria | Semantic agent self-verification |
203
+ | **L1.5** | pACS Calibration | 3D confidence scoring (Faithfulness, Completeness, Logic) | Pre-mortem protocol ($\min(F, C, L)$) |
204
+ | **L2** | Adversarial Review | Independent critique, claim audit, and web fact-checking | `@reviewer` + `@fact-checker` subagents |
205
+
206
+ ---
207
+
208
+ ## 💻 Dual-Language SDK Usage
209
+
210
+ ### TypeScript & Bun (`npm install agentic-workflow` or `bun add agentic-workflow`)
211
+
212
+ ```typescript
213
+ import {
214
+ AutopilotEngine,
215
+ HookDispatcher,
216
+ IntegrationInstaller,
217
+ encodeToon,
218
+ calculateTokenSavings
219
+ } from 'agentic-workflow';
220
+
221
+ // 1. Token-Oriented Object Notation (v4.1) compression
222
+ const data = {
223
+ users: [
224
+ { id: 1, name: "Alice", role: "architect" },
225
+ { id: 2, name: "Bob", role: "reviewer" }
226
+ ]
227
+ };
228
+ const toonData = encodeToon(data);
229
+ console.log(`Compressed TOON:\n${toonData}`);
230
+
231
+ // 2. Hook Dispatcher evaluation
232
+ const dispatcher = new HookDispatcher(process.cwd());
233
+ const check = dispatcher.dispatch({
234
+ event_id: "evt_1",
235
+ source: "cli",
236
+ hook_type: "pre_command",
237
+ timestamp: Date.now(),
238
+ command: "git status"
239
+ });
240
+ console.log(`Hook verdict: ${check.verdict}`);
241
+ ```
242
+
243
+ ### Python (`pip install agentic-workflow`)
244
+
245
+ ```python
246
+ from agentic_workflow import (
247
+ AutopilotEngine,
248
+ HookDispatcher,
249
+ IntegrationInstaller,
250
+ CleanCodeChecker,
251
+ MultiAgentManager
252
+ )
253
+
254
+ # 1. Launch Autopilot Engine
255
+ engine = AutopilotEngine(project_dir=".", auto_approve=True)
256
+ engine.plan_default_workflow(
257
+ title="Data Ingestion Pipeline",
258
+ goal="Autonomous end-to-end data ingestion with quality gates"
259
+ )
260
+ success = engine.run_all()
261
+
262
+ # 2. Check Supportive Tools Status
263
+ installer = IntegrationInstaller(project_dir=".")
264
+ results = installer.check_all()
265
+ for r in results:
266
+ print(f"- {r.name}: {r.status}")
267
+ ```
268
+
269
+ ---
270
+
271
+ ## ⚙️ CLI Reference
272
+
273
+ ```bash
274
+ # Launch autonomous end-to-end autopilot workflow with self-fueling & energy management
275
+ agentic-workflow autopilot --title "Production Pipeline" --goal "Autonomous Delivery"
276
+
277
+ # Run Clean Code Guard audit pass (SOLID, 24 Imperatives, AI failure modes)
278
+ agentic-workflow guard [directory]
279
+
280
+ # Execute AI Engineer fairness, drift, and prompt-injection evaluation gates
281
+ agentic-workflow eval
282
+
283
+ # Query multi-agent observable trace logs and spans
284
+ agentic-workflow traces
285
+
286
+ # Manage supportive tools (Ponytail, TOON, Fable, Caveman) & lifecycle
287
+ agentic-workflow integrations status
288
+ agentic-workflow integrations install
289
+ agentic-workflow integrations phase planning
290
+
291
+ # Token-Oriented Object Notation (v4.1) benchmarks and conversion
292
+ agentic-workflow toon benchmark
293
+ agentic-workflow toon convert <file.json>
294
+
295
+ # Initialize infrastructure, SOT runtime directories, and supportive tools
296
+ agentic-workflow init
297
+
298
+ # Validate workflow.md, SOT schema, and pACS integrity
299
+ agentic-workflow validate
300
+
301
+ # Check current workflow progress and observability dashboard
302
+ agentic-workflow status
303
+
304
+ # Run full automated test suite (16 suites: safety, guard, MAS, engines, integrations)
305
+ agentic-workflow test
306
+ ```
307
+
308
+ ---
309
+
310
+ ## 🧰 Supportive Tools Ecosystem
311
+
312
+ AgenticWorkflow automatically provisions and directs specialized supportive tools across its execution phases without manual user overhead:
313
+
314
+ | Supportive Tool | Role & Category | Designated Lifecycle Phase |
315
+ |---|---|---|
316
+ | **[Ponytail](https://github.com/DietrichGebert/ponytail)** | **Simplicity Governor & Anti-Debt** | **Planning & Implementation**: Enforces YAGNI ladder, stdlib-first, and shortest working surgical diffs. |
317
+ | **[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. |
318
+ | **[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/`). |
319
+ | **[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. |
320
+
321
+ ---
322
+
323
+ ## 📜 Absolute Criteria (Canon)
324
+
325
+ These constitutional rules govern every design, execution, and modification decision:
326
+
327
+ 1. **Absolute Criterion 1: Quality of the Final Deliverable**
328
+ > Speed, token cost, workload, and length limits are completely ignored. The sole criterion for every decision is the **quality of the final deliverable**.
329
+ 2. **Absolute Criterion 2: Single-File SOT + Hierarchical Memory**
330
+ > 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.
331
+ 3. **Absolute Criterion 3: Code Change Protocol (CCP)**
332
+ > 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).
333
+
334
+ ---
335
+
336
+ ## 📖 Documentation Roadmap
337
+
338
+ 1. **README.md** (This document) — High-level bird's-eye overview and distribution hub.
339
+ 2. [`soul.md`](soul.md) — The philosophical core and DNA inheritance principles.
340
+ 3. [`AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md`](AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md) — Architectural design and theoretical foundations.
341
+ 4. [`DECISION-LOG.md`](DECISION-LOG.md) — Complete historical record of architectural decisions (ADRs).
342
+ 5. [`AGENTICWORKFLOW-USER-MANUAL.md`](AGENTICWORKFLOW-USER-MANUAL.md) — Practical step-by-step operating instructions.
343
+ 6. [`AGENTS.md`](AGENTS.md) — Universal directive and constitutional rules.
344
+ 7. [`docs/protocols/`](docs/protocols/) — Deep-dive execution protocols.
345
+
346
+ ---
347
+
348
+ ## 📄 License
349
+
350
+ MIT License © 2026 Mamdouh Aboammar & Yoonsik Choi. All rights reserved.