Zing Forum

Reading

AI-Native Development Environment Setup: Chezmoi-Managed Terminal-First AI CLI Workflow

This article introduces a carefully designed Linux dotfiles configuration tailored for AI-assisted engineering, covering full configurations for Codex and Claude Code, reusable Agent skills, the Graphiti memory layer, and reproducible development environment setup.

AI辅助开发dotfilesChezmoiCodexClaude CodeAGENTS.md终端工作流Linux配置可复用技能Graphiti
Published 2026-05-24 03:15Recent activity 2026-05-24 03:21Estimated read 7 min
AI-Native Development Environment Setup: Chezmoi-Managed Terminal-First AI CLI Workflow
1

Section 01

Introduction / Main Floor: AI-Native Development Environment Setup: Chezmoi-Managed Terminal-First AI CLI Workflow

This article introduces a carefully designed Linux dotfiles configuration tailored for AI-assisted engineering, covering full configurations for Codex and Claude Code, reusable Agent skills, the Graphiti memory layer, and reproducible development environment setup.

2

Section 02

Original Author and Source

  • Original Author/Maintainer: Kevin-Mok
  • Source Platform: GitHub
  • Original Title: ai-cli-dotfiles / KM's Four-Codex Operating Environment
  • Original Link: https://github.com/Kevin-Mok/ai-cli-dotfiles
  • Publication Date: May 23, 2026

3

Section 03

Core Philosophy: Configuration as Code for AI-Assisted Engineering

This repository is not just a set of Linux configuration files, but a complete operating system layer for AI-assisted engineering. Beneath the surface of traditional chezmoi dotfiles lies a traceable operation layer designed for Codex: AGENTS files, runtime default configurations, reusable local skills, Graphiti-supported memory layer, and ExecPlans designed for parallel terminal-agent work.

For AI-native engineers, the core value of this repository lies in: it demonstrates how to build a reproducible, traceable, and collaborative AI-assisted development environment.


4

Section 04

Technology Stack Overview

Layer Repository Evidence Reason for Selection
chezmoi dot_config/chezmoi/ Reproducible across machines, avoiding configuration lock-in to a single laptop
Codex CLI dot_codex/config.toml Versioned models, inference, trust boundaries, MCP, and session default configurations
AGENT Instruction Chain AGENTS.md, AGENTS.repo.md Transform planning, validation, commit norms, and document synchronization into reviewable workflow rules
Claude Code dot_claude/CLAUDE.md Import via @path to share the same AGENTS.md behavior baseline
Local Skills dot_agents/skills/ Package repetitive tasks into reusable local capabilities
Graphiti MCP dot_codex/config.toml Add a retrievable memory layer for multi-session work
Shell Toolchain fish, tmux, kitty, i3 Terminal-first execution, optimized for multiple parallel panes

5

Section 05

Instruction Chain Upgrade

The system achieves behavioral consistency through hierarchical AGENTS files:

  • AGENTS.md: Shared baseline instructions
  • AGENTS.repo.md: Points to repository-specific authoritative sources
  • dot_codex/AGENTS.md: Normative work document for Codex
  • dot_claude/CLAUDE.md: Imports via @path to share the same baseline

These instructions are not vague philosophies, but specific engineering behavior norms:

  • Planning Mode: Non-trivial work uses explicit steps, assumptions, risks, and validation
  • Failure Reproduction Priority: Must have a reproducible failure case before fixing
  • Explicit Validation: Prove via tests, diffs, logs, or manual checks before completion
  • Document Synchronization: Behavioral changes are accompanied by document updates
  • Small Reversible Steps: Changes remain reviewable and easy to roll back
  • Conventional Commits: Commit history clearly conveys intent
6

Section 06

Traceable Codex Default Configuration

dot_codex/config.toml allows each Codex session to start with a strong configuration:

  • Default model and inference level
  • Trusted local project paths
  • MCP server configuration
  • Notifications, status bar, TUI key mapping preferences
  • Repository-specific developer instructions

This means new Codex panes immediately inherit the same configuration without needing re-briefing.

7

Section 07

Reusable Local Skills

dot_agents/skills/ transforms repetitive prompts into reusable capabilities. Each skill is installed to ~/.agents/skills//SKILL.md for Codex use, and symlinked to ~/.claude/skills/ for Claude Code use.

Main skill categories:

  • commit-plan: Review worktree before commit, separate concerns, mark risky changes
  • research: Research task automation
  • browser: Browser automation
  • design: Design workflow
  • docs: Document lookup
  • media: Media tasks
8

Section 08

Graphiti Memory Layer

Via Neo4j-supported Graphiti MCP, Codex gains a local temporal memory surface for long-running multi-session work. Memories include source and evolution context, supporting continuous tracking of complex projects.