GitHunt
DO

domelic/architecture-of-thought

The Architecture of Thought: The Dialectical Cognition Framework - A Treatise on Human-AI Collaboration

The Architecture of Thought

The Dialectical Cognition Framework (DCF): A Methodology for Human-AI Collaboration

DOI
GitHub release
License: CC BY-NC-SA 4.0

DCF positions LLMs as thinking mirrors: collaborative partners in the architecture of thought itself.

What is DCF? A methodology for working with AI that emphasizes questioning over extraction. Instead of "give me the answer," you engage in structured Socratic dialogue that surfaces assumptions, explores alternatives, and builds genuine understanding.

DCF operates at the micro level of human-AI interaction—the cognitive strategy for how to think during checkpoints, reviews, and approvals. It's a "cognitive operating system" that runs on top of whatever agentic framework you choose.

What's included
  • The Thinking Mirror hypothesis for understanding human-LLM interaction
  • 12 core principles including Socratic dialogue, recursive refinement, and anticipatory calibration
  • 24 modes across 5 categories (evaluation, problem-solving, design, learning, session management)
  • 14 documented anti-patterns with diagnostic questions and mitigations
  • Positioning within the 2025-2026 AI methodology landscape (ACE-FCA, 12-Factor Agents, BMAD, Ralph)
  • Research-grounded autonomy risk framework with empirically-validated mitigations
  • The "Could You Be Wrong?" checkpoint protocol for surfacing adversarial information

Who is this for? Software engineers, technical writers, and knowledge workers who want to move beyond surface-level prompting with AI coding assistants.


Table of Contents

Practice Theory & Reference
Quick Start — Install & begin The Book (Optional) — 265-page treatise
Installation — Setup details Theoretical Foundations — Research basis
Claude Code Skills/dcf and /cybw Citation — How to cite
All DCF Modes — Complete 24-mode reference
Practical Resources — Templates, prompts, exercises

Most users should start with Quick Start and the Practical Resources.


Quick Start

You don't need to read the book to use DCF. Start with the practical tools:

To... Use this
Install the skills curl -fsSL https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/scripts/install-dcf.sh | bash
Get a 5-minute overview DCF Essentials
Start a Socratic dialogue /dcf in Claude Code
Challenge your assumptions /cybw in Claude Code
See it in action Example Transcripts

The core loop:

graph LR
    A[Articulate] --> B[Generate]
    B --> C[Evaluate]
    C --> D[Refine]
    D --> A
Loading

Installation

Prerequisite: Claude Code — Anthropic's agentic coding tool

Quick Install (recommended):

curl -fsSL https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/scripts/install-dcf.sh | bash

This installs the /dcf and /cybw skills globally, the dcf-workflow script, and optionally configures hooks.

Manual Installation

1. Install skills:

# Global installation (available in all projects)
mkdir -p ~/.claude/commands
curl -o ~/.claude/commands/dcf.md https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/commands/dcf.md
curl -o ~/.claude/commands/cybw.md https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/commands/cybw.md

# Or project-level installation
mkdir -p .claude/commands
curl -o .claude/commands/dcf.md https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/commands/dcf.md
curl -o .claude/commands/cybw.md https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/commands/cybw.md

2. Install dcf-workflow script (optional):

mkdir -p ~/bin
curl -o ~/bin/dcf-workflow https://raw.githubusercontent.com/domelic/architecture-of-thought/main/.claude/scripts/dcf-workflow
chmod +x ~/bin/dcf-workflow
echo 'export PATH="$HOME/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

3. Verify installation:

dcf-workflow --help  # Check workflow script
/dcf                  # Check skill in Claude Code

Claude Code Skills

/dcf [mode] [context] — Socratic Dialogue

24 modes across 5 categories for structured thinking:

/dcf                     # General Socratic dialogue

# Evaluation & Review
/dcf review              # Evaluate before committing
/dcf checkpoint          # Agentic decision point
/dcf self-review         # Have Claude review its own work

# Problem Solving
/dcf debug               # Question the mental model
/dcf unstick             # Break through blocks
/dcf decompose           # Systematic task breakdown

# Design & Analysis
/dcf architect           # Divergent exploration → minimal viable change
/dcf tradeoffs           # Structured tradeoff analysis
/dcf assumptions         # Deep assumption excavation
/dcf premortem           # Anticipate failure before starting

# Learning
/dcf learn <topic>       # Build understanding through dialogue
/dcf onboard             # Explore unfamiliar codebase

See all 24 modes →

/cybw [target] — Could You Be Wrong?

Quick adversarial checkpoint based on Hills (2025) research:

/cybw                           # Challenge the last response
/cybw the caching strategy      # Challenge a specific decision
/cybw "users want this feature" # Challenge an assumption

Tip

"Could you be wrong?" surfaces errors, biases, and alternatives absent from initial responses. Use it at every checkpoint before approval.


All DCF Modes

Complete list of 24 modes
/dcf [mode] [context]

/dcf                     # General Socratic dialogue

# Evaluation & Review
/dcf review              # Evaluate before committing
/dcf checkpoint          # Agentic decision point
/dcf self-review         # Have Claude review its own work
/dcf refine              # Iterate deliberately on output

# Problem Solving
/dcf debug               # Question the mental model
/dcf unstick             # Break through blocks
/dcf simplify            # Find the essential
/dcf diagnose            # Identify which anti-pattern you're falling into
/dcf decompose           # Systematic task breakdown with dependency mapping
/dcf verify              # Multi-path reasoning synthesis for confidence

# Design & Analysis
/dcf architect           # Divergent exploration → minimal viable change
/dcf tradeoffs           # Structured tradeoff analysis
/dcf assumptions         # Deep assumption excavation
/dcf premortem           # Anticipate failure before starting
/dcf challenge           # Steelman the opposition
/dcf decide              # Reach closure on a decision
/dcf constrain           # Define boundaries before generation

# Learning & Exploration
/dcf learn <topic>       # Build understanding through dialogue
/dcf onboard             # Explore unfamiliar codebase/domain
/dcf explain             # Feynman technique - teach to test understanding

# Session Management
/dcf compact             # Prepare for session compaction
/dcf context-health      # Assess and address context rot
/dcf retro               # Capture learning
/dcf skill               # Capture pattern as reusable skill
Workflow automation with dcf-workflow

Chain modes with checkpoints:

dcf-workflow new-project              # onboard → architect → premortem
dcf-workflow debug "auth timeout"     # debug → assumptions → simplify
dcf-workflow decision "API design"    # tradeoffs → challenge → decide
dcf-workflow complex-task             # constrain → decompose → architect
dcf-workflow high-stakes              # assumptions → verify → challenge → decide
dcf-workflow unfamiliar               # onboard → decompose → verify

Caution: Workflows are scaffolding. Each transition should be a genuine checkpoint—not automatic progression.

Optional: Configure hooks

Add to your project's .claude/settings.local.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit",
        "hooks": [
          {
            "type": "command",
            "command": "echo '💭 DCF Checkpoint: What assumptions did this edit make?'"
          }
        ]
      }
    ],
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "echo '🪞 DCF Active: Think WITH the AI, not just use it.'"
          }
        ]
      }
    ]
  }
}

See .claude/settings.example.json for additional examples.


Practical Resources

Start Here

Resource Description Time
DCF Essentials Condensed practitioner's guide 5 min
Example Transcripts 4 annotated real-world conversations 15 min
Anti-Patterns Guide 14 failure modes with fixes 10 min

Daily Practice

Resource Description Use Case
Prompt Library Ready-to-use Socratic prompts Daily AI interactions
CLAUDE.md Template DCF-informed project configuration Starting new projects
Self-Assessment Weekly reflection template Tracking growth
Workshop Exercises 8 hands-on practice scenarios Skill development

Reference

Resource Description Use Case
Visual Guide Diagrams and visual references Quick lookup
FAQ Comprehensive Q&A Common questions
Glossary 40+ term definitions Term lookup
Framework Integration DCF + Ralph, Plan Mode, BMAD Combining methodologies
Comparison Matrix DCF vs other methodologies Choosing approaches

Case Studies

Example Domain DCF Principles
Debugging Race Condition Software Development Elenchus, Recursive Refinement
API Architecture Decision System Design Dialectic, Checkpoint Protocol
Learning Rust Ownership Learning Maieutics, Learning Stance

See examples/README.md for the full collection.

Team Adoption

Resource Description Use Case
Team Adoption Playbook 5-phase organizational guide Rolling out DCF
Slide Deck Presentation for teaching DCF Team training
Case Study Template Standardized documentation format Sharing experiences
Reading List Annotated bibliography Deeper learning

The Book (Optional)

Note

The book is an early draft — a work in progress exploring the theoretical foundations. You can be fully productive with DCF using just the skills and resources above.

"The Architecture of Thought" is a 265-page treatise that dives deep into the philosophy and cognitive science behind DCF. It's for those who want to understand why the framework works, not just how to use it.

Format Link
Free PDF Download (265 pages)
Free EPUB Download
Kindle Amazon ($9.99)

Pages
LaTeX
Amazon KDP

Book Contents (12 Parts)
Part Title Key Chapters
I The Core Philosophy of DCF Extraction to Collaboration, The Thinking Mirror, Language as Infrastructure
II The Socratic Method Reimagined Socratic Dialogue as Methodology, The Five Phases of Socratic Prompting
III Prompt Chaining as Cognitive Architecture Why Single Prompts Fail, Designing Prompt Chains, Recursive Refinement
IV From Documentation to Knowledge Engineering Minimal Viable Document, Documentation as System Design, Knowledge Architecture
V Metacognition and Self-Directed Learning Thinking About Thinking, The Learning Stance, Building PKM Systems
VI Philosophical and Cognitive Science Foundations Extended Mind Thesis, Distributed Cognition, Scaffolding Theory, Dialectical Tradition
VII Claude Code and Development Best Practices Architecture, Agent Ecosystem, Memory Systems, Team-Scale DCF, MCP Orchestration
VIII Practical Application Framework Practitioner's Toolkit, Failure Modes (14 anti-patterns), Measuring Improvement, Case Studies
IX The Emerging Discipline Naming the Field, The Future of Thought Work, Your Role in This Emergence
X Positioning Within the AI Methodology Landscape Framework Comparisons (ACE-FCA, BMAD, Ralph), The Stack View, Practical Integration
XI Agentic Era Adaptations Manual to Autonomous, Extended Thinking, When to Engage vs. Trust
XII Critical Perspectives Limitations of DCF, Ethical Considerations

Appendices: DCF Principles Summary, Prompt Reference, Recommended Reading, Claude Code Resources, Research References, Meta-Example, Glossary (~40 terms), Exercises


Theoretical Foundations

DCF draws on established research in cognitive science and philosophy:

  • Extended Mind Thesis — Clark & Chalmers (1998)
  • Distributed Cognition — Hutchins (1995)
  • Scaffolding Theory — Vygotsky, Bruner, Wood & Ross
  • Hermeneutics — Gadamer's "fusion of horizons" (Horizontverschmelzung)
  • Critical Rationalism — Popper's falsificationism (1963)
  • Double-Loop Learning — Argyris (1977)
Research validation

Recent research validates DCF's core practices:

  • Metacognitive Prompting — Hills (2025) demonstrates that "Could you be wrong?" generates adversarial information absent from initial responses
  • Autonomy Risk Framework — Kovács & Szelényi (2025) identifies false mental states and cognitive deskilling as primary risks
  • Collaboration Measurement — Sidra & Mason (2025) provides validated scales for collaborative AI literacy and metacognition
  • Human-AI Collaboration — Nature Human Behaviour (2024) meta-analysis, Synergy Index (2025)
  • Independent Validation — Hashemi Tonekaboni & Soleymani (HICSS 2026) independently operationalizes Socratic elements in multi-agent architecture

Citation

If you use or reference this work, please cite:

@misc{omelic2026architecture,
  author = {Omelic, Damir and {Claude (Anthropic)}},
  title = {The Architecture of Thought: The Dialectical Cognition Framework},
  year = {2026},
  doi = {10.5281/zenodo.18275169},
  url = {https://doi.org/10.5281/zenodo.18275169},
  note = {A Treatise on Human-AI Collaboration in the Agentic Era}
}
APA / Chicago formats

APA: Omelic, D., & Claude. (2026). The Architecture of Thought: The Dialectical Cognition Framework. Zenodo. https://doi.org/10.5281/zenodo.18275169

Chicago: Omelic, Damir, and Claude. "The Architecture of Thought: The Dialectical Cognition Framework." Zenodo, 2026. https://doi.org/10.5281/zenodo.18275169.


Repository Structure

Directory layout
/
├── README.md                         # This file
├── LICENSE.md                        # License overview and clarifications
├── LICENSE-CC-BY-NC-SA-4.0           # Full CC-BY-NC-SA-4.0 text
├── CLAUDE.md                         # Claude Code project instructions
├── DCF_ESSENTIALS.md                 # Condensed practitioner's guide
├── CONTRIBUTING.md                   # Contribution guidelines
├── CODE_OF_CONDUCT.md                # Community guidelines
├── CHANGELOG.md                      # Version history (auto-generated)
├── RELEASING.md                      # Release process checklist
├── CITATION.cff                      # Machine-readable citation
├── THE_ARCHITECTURE_OF_THOUGHT.pdf   # Compiled document (265 pages)
├── THE_ARCHITECTURE_OF_THOUGHT.tex   # LaTeX source
├── references.bib                    # BibTeX bibliography (31 sources)
├── commitlint.config.js              # Conventional commit enforcement
├── release-please-config.json        # Release automation config
├── assets/
│   └── cover.jpg                     # Book cover image
├── .github/
│   ├── CODEOWNERS                    # Code ownership definitions
│   ├── FUNDING.yml                   # Sponsorship configuration
│   ├── PULL_REQUEST_TEMPLATE.md      # PR template
│   ├── dependabot.yml                # Dependency update automation
│   ├── social-preview.svg            # Repository social image
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md             # Bug report template
│   │   ├── feature_request.md        # Feature request template
│   │   ├── case_study.md             # Case study submission template
│   │   └── config.yml                # Template chooser config
│   └── workflows/
│       ├── release-please.yml        # Automated releases
│       ├── amazon-kdp-publish.yml    # EPUB build on release
│       ├── commitlint.yml            # Commit message validation
│       ├── markdown-lint.yml         # Markdown formatting
│       ├── spell-check.yml           # Spelling validation
│       ├── link-checker.yml          # Broken link detection
│       ├── compile-pdf.yml           # LaTeX compilation
│       ├── pdf-preview.yml           # PR artifact preview
│       ├── stale.yml                 # Inactive issue management
│       └── welcome.yml               # New contributor greeting
├── .claude/
│   ├── commands/
│   │   └── dcf.md                    # Claude Code skill for DCF
│   ├── scripts/
│   │   ├── dcf-workflow              # Workflow automation script
│   │   ├── install-dcf.sh            # Installation script
│   │   └── README.md                 # Scripts documentation
│   └── settings.example.json         # Example hooks configuration
├── .serena/
│   ├── .gitignore                    # Cache exclusion
│   ├── project.yml                   # Serena project configuration
│   └── memories/
│       ├── LATEX_EDITING_GUIDE.md    # Document structure and editing patterns
│       ├── DCF_CONCEPTS.md           # Framework terminology quick reference
│       ├── STYLE_GUIDE.md            # Writing conventions and formatting
│       ├── CROSS_REFERENCES.md       # Concept dependencies and locations
│       ├── BIBLIOGRAPHY_SOURCES.md   # Annotated citation guide
│       └── REVISION_DECISIONS.md     # Editorial decision log
├── examples/
│   ├── README.md                     # Examples overview
│   ├── CASE_STUDY_debugging_race_condition.md
│   ├── CASE_STUDY_api_architecture.md
│   └── CASE_STUDY_learning_rust.md
└── resources/
    ├── CLAUDE_MD_TEMPLATE.md         # Project configuration template
    ├── DCF_PROMPT_LIBRARY.md         # Socratic prompts by situation
    ├── DCF_SELF_ASSESSMENT.md        # Weekly reflection template
    ├── DCF_WORKSHOP_EXERCISES.md     # 8 practice exercises
    ├── DCF_VISUAL_GUIDE.md           # Diagrams and visual references
    ├── DCF_SLIDE_DECK.md             # Presentation slides
    ├── DCF_FRAMEWORK_INTEGRATION.md  # Integration with other frameworks
    ├── DCF_ANTI_PATTERNS.md          # 14 failure modes with fixes
    ├── DCF_EXAMPLE_TRANSCRIPTS.md    # 4 annotated conversations
    ├── DCF_FAQ.md                    # Frequently asked questions
    ├── DCF_GLOSSARY.md               # Term definitions
    ├── DCF_READING_LIST.md           # Annotated bibliography
    ├── DCF_COMPARISON_MATRIX.md      # DCF vs other methodologies
    ├── DCF_TEAM_ADOPTION_PLAYBOOK.md # Organizational adoption guide
    ├── DCF_CASE_STUDY_TEMPLATE.md    # Documentation template
    ├── DCF_VIDEO_SCRIPT.md           # Media production script
    └── DCF_RESEARCH_AGENDA.md        # Open research questions
Building from source

Requires LaTeX (TeX Live 2025 or MacTeX):

# Full compilation with bibliography and index
pdflatex THE_ARCHITECTURE_OF_THOUGHT.tex
bibtex THE_ARCHITECTURE_OF_THOUGHT
makeindex THE_ARCHITECTURE_OF_THOUGHT
pdflatex THE_ARCHITECTURE_OF_THOUGHT.tex
pdflatex THE_ARCHITECTURE_OF_THOUGHT.tex

Contributing

File Description
CONTRIBUTING.md How to contribute to DCF
CHANGELOG.md Version history and changes
RELEASING.md Release process and checklist

License

This project is licensed under CC-BY-NC-SA-4.0.

Free to use at work, in your projects, and for learning. Commercial use (selling courses, books, certifications based on DCF) requires permission.

See LICENSE.md for details on what's allowed.

© 2026 Damir Omelic. Co-authored with Claude (Anthropic). The human author retains full intellectual property rights.


If you find DCF useful, consider starring the repo to help others discover it.