agentic-workflow
CLAUDE.md0 starsChanged 2 months agoMITView on GitHub
Claude Code-based agent workflow automation project. Designing workflow.md is an intermediate blueprint. Ensuring the workflow actually executes and produces verified deliverables is the final goal. 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. The top-level rules applied to every design, implementation, and modification decision. These supersede…
- Deletes or force-pushes
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/agentic-hooks.mdcCursor rule
- .cursor/rules/agentic-workflow.mdcCursor rule
- .cursor/rules/agenticworkflow.mdcCursor rule
- doctoral-writingSkill
- workflow-generatorSkill
- agentic-workflowSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 121
Mandatory Action: When [CONTEXT RECOVERY] appears at session start, you must read the indicated snapshot file via Read tool to restore …
- Distinctive: line 170
Visualization: Prefer clean Mermaid diagrams with quoted labels
- Distinctive: line 178
Always reflect and audit against the Absolute Criteria after any modification.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AgenticWorkflow
Claude Code-based agent workflow automation project.
Final Goal
- Workflow Design: Systematically design complex tasks into a 3-stage
workflow.md(Research → Planning → Implementation). - Workflow Execution: Actually implement the agents, scripts, and automation pipeline configured in
workflow.md.
Designing
workflow.mdis an intermediate blueprint. Ensuring the workflow actually executes and produces verified deliverables is the final goal.
Purpose of Existence — DNA Inheritance
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.
Absolute Criteria
The top-level rules applied to every design, implementation, and modification decision. These supersede all guidelines and principles below.
Absolute Criterion 1: Quality of the Final Deliverable
Speed, token cost, workload, and length limits are completely ignored. The sole criterion for every decision is the quality of the final deliverable.
Absolute Criterion 2: Single-File SOT + Hierarchical Memory Structure
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.
Absolute Criterion 3: Code Change Protocol (CCP)
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.
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.
Priority Among Absolute Criteria
Absolute Criterion 1 (Quality) is paramount. Absolute Criterion 2 (SOT) and Absolute Criterion 3 (CCP) are co-equal means to guarantee quality.
TOON Style Enforcement (v4.1)
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.
Project Structure
AgenticWorkflow/
├── CLAUDE.md ← This file (Claude Code directive — lightweight TOC)
├── AGENTS.md ← Universal AI agent common directive (Hub — methodology SOT)
├── GEMINI.md ← Gemini CLI / Antigravity directive (Spoke)
├── soul.md ← DNA inheritance definition
├── DECISION-LOG.md ← Architecture Decision Records (ADR, 51+ records)
├── AGENTICWORKFLOW-USER-MANUAL.md ← User manual
├── AGENTICWORKFLOW-ARCHITECTURE-AND-PHILOSOPHY.md ← Design philosophy and architectural bird's-eye view
├── docs/protocols/ ← Detailed protocols (on-demand references)
│ ├── autopilot-execution.md (Workflow execution checklist + NEVER DO)
│ ├── quality-gates.md (L0-L2 4-layer + P1 14-item validation details)
│ ├── ulw-mode.md (ULW 3 intensifier rules + runtime mechanics)
│ ├── context-preservation-detail.md (Hook internal mechanics + D-7 instances)
│ └── code-change-protocol.md (CCP 3 steps + CAP + Proportionality Rule)
├── .claude/
│ ├── settings.json ← Hook configuration
│ ├── agents/
│ │ ├── translator.md (Terminology consistency specialist)
│ │ ├── reviewer.md (Adversarial reviewer, Enhanced L2)
│ │ └── fact-checker.md (Fact-checker, claim-by-claim verification)
│ ├── commands/
│ │ ├── install.md (/install — Setup Init validation)
│ │ └── maintenance.md (/maintenance — Health check)
│ ├── hooks/scripts/ ← Hook + validation scripts
│ │ ├── context_guard.py (Unified dispatcher)
│ │ ├── _context_lib.py (Shared library — parsing, generation, validation, compression)
│ │ ├── save_context.py (SessionEnd/PreCompact snapshot persistence)
│ │ ├── restore_context.py (SessionStart restore + RLM pointers)
│ │ ├── update_work_log.py (PostToolUse 9 tools tracking)
│ │ ├── generate_context_summary.py (Stop incremental snapshot + safety net)
│ │ ├── diagnose_context.py (Abductive Diagnosis pre-analysis)
│ │ ├── validate_diagnosis.py (AD1-AD10 post-validation)
│ │ ├── validate_pacs.py (PA1-PA7 + L0 validation)
│ │ ├── validate_review.py (R1-R5 review validation)
│ │ ├── validate_traceability.py (CT1-CT5 traceability validation)
│ │ ├── validate_domain_knowledge.py (DK1-DK7 domain knowledge validation)
│ │ ├── validate_translation.py (T1-T9 translation & glossary validation)
│ │ ├── validate_verification.py (V1a-V1c verification log validation)
│ │ ├── validate_workflow.py (W1-W8 DNA inheritance validation)
│ │ ├── validate_retry_budget.py (RB1-RB3 retry budget decision)
│ │ ├── setup_init.py (Infrastructure health check + SOT write pattern check)
│ │ ├── setup_maintenance.py (Periodic health check + doc-code sync)
│ │ ├── block_destructive_commands.py (Dangerous command blocking: network/system/git/rm, exit 2)
│ │ ├── block_test_file_edit.py (TDD Guard, .tdd-guard toggle)
│ │ ├── predictive_debug_guard.py (Risk file warning based on error history, exit 0)
│ │ ├── output_secret_filter.py (Secret detection: 3-tier, 25+ regexes, 2-pass scan)
│ │ ├── security_sensitive_file_guard.py (Security sensitive file modification warning)
│ │ ├── query_workflow.py (Workflow observability: dashboard/weakest/retry/blocked)
│ │ ├── _test_secret_filter.py (output_secret_filter tests — 44 cases)
│ │ ├── _test_sensitive_file_guard.py (security_sensitive_file_guard tests — 44 cases)
│ │ └── _test_block_destructive.py (block_destructive_commands tests — 43 cases)
│ ├── context-snapshots/ ← Runtime snapshots (gitignored)
│ └── skills/
│ ├── workflow-generator/ (Workflow design & generation skill)
│ └── doctoral-writing/ (Doctoral academic writing skill)
├── translations/glossary.yaml ← Terminology glossary
├── prompt/ ← PRD investigation frameworks & agent prompts
└── coding-resource/ ← Theoretical foundationsContext Preservation System
An automatic persistence and recovery system that prevents loss of work context upon context token exhaustion, /clear, or compaction.
| Hook Event | Script | Action |
Setup (--init) | setup_init.py | Infrastructure health check + SOT write safety + runtime directory init |
Setup (--maintenance) | setup_maintenance.py | Periodic health check + doc-code synchronization |
| PreToolUse (Bash) | block_destructive_commands.py | Blocks dangerous commands: network exfil, raw format, git reset/force, rm -rf (exit 2) |
| PreToolUse (Edit|Write) | block_test_file_edit.py | Protects test files during active TDD Guard (exit 2) |
| PreToolUse (Edit|Write) | predictive_debug_guard.py | Warns on high-risk files based on past failure history |
| SessionStart | restore_context.py | RLM pointers + past session index + Predictive Debugging risk cache |
| PostToolUse (9 tools) | update_work_log.py | Accumulates granular tool usage logs |
| PostToolUse (Bash|Read) | output_secret_filter.py | Detects leaked secrets (3-tier extraction, 2-pass scan) |
| PostToolUse (Edit|Write) | security_sensitive_file_guard.py | Warns on security-sensitive file changes |
| Stop | generate_context_summary.py | Incremental snapshot + Knowledge Archive indexing + safety net |
| PreCompact | save_context.py | Saves full snapshot before context compaction |
| SessionEnd | save_context.py | Saves full snapshot on /clear or session exit |
Mandatory Action: When [CONTEXT RECOVERY] appears at session start, you must read the indicated snapshot file via Read tool to restore prior working context.
Details: Hook internal mechanics, Knowledge Archive schema, and D-7 instances → docs/protocols/context-preservation-detail.md.
Skill Invocation Routing
| User Request Pattern | Skill | Entry Point |
| "create workflow", "design automation pipeline", "build workflow" | workflow-generator | SKILL.md |
| "write in doctoral style", "academic writing", "dissertation polish" | doctoral-writing | SKILL.md |
Core Design Principles
- P1 — Data Refinement for Accuracy: Strip noise deterministically via Python code before handing off to AI agents.
- P2 — Expertise-Based Delegation Structure: Delegate specialized tasks to domain agents; Orchestrator focuses on coordination.
- P3 — Resource Accuracy: Explicit paths for all files, dependencies, and external assets; placeholders are forbidden.
- P4 — Question Design Rules: Maximum 4 questions, each with ~3 options. Proceed without questions if unambiguous.
Autopilot Mode
Autonomous execution mode that auto-approves (human) review stages and questions. Details: AGENTS.md §5.1.
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.
Required Reading Before Execution: docs/protocols/autopilot-execution.md — step-by-step checklist and NEVER DO rules.
ULW (Ultrawork) Mode
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).
Details: docs/protocols/ulw-mode.md.
Supportive Tools Ecosystem & Sequential Operational Lifecycle
The system automatically provisions and orchestrates supportive tools:
- Continuous Layer: TOON v4.1 for structured data exchange and Caveman mode for concise, zero-slop agent reasoning and logs.
- Phase 2 (Architecture & Planning): Ponytail YAGNI Ladder (Rung 1-3: question speculative code, stdlib-first, reuse existing patterns) + Fable Plan.
- Phase 3 (Implementation): Ponytail Surgical Diffs (Rung 4-7: fewest files, shortest diff, root cause fix) + Fable Circuit Breaker (halt if failure streak >= 2).
- Phase 4 (Verification): Clean Code Guard + Ponytail Anti-Debt audit + L0-L2 quality gates.
- Phase 5 (Handoff): Compact session into durable continuation state (
.fable/state.json,.fable/PROGRESS.md).
Details: AGENTS.md §5.8.
Language and Style Rules
- Framework Documentation & User Dialogue: Pure English
- Workflow Execution: Pure English (maximizes AI reasoning capability — Absolute Criterion 1)
- Deliverables: English primary deliverables
- Technical Terminology: Maintain standard English terms (SOT, Agent Team, Hooks, pACS, etc.)
- Visualization: Prefer clean Mermaid diagrams with quoted labels
- Depth: Comprehensive, data-backed exposition over superficial summaries
Skill Development Rules
- Embed all Absolute Criteria — contextualized for the target domain.
- Strict division of file responsibilities —
SKILL.md(WHY / Routing),references/(WHAT / HOW / VERIFY). - Explicit conflict resolution scenarios among Absolute Criteria.
- Always reflect and audit against the Absolute Criteria after any modification.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

