Claude Code Opus 4.5: Agentic Publishing Workflows
Table of Contents
overview
This document captures lessons learned from using Claude Code (powered by Opus 4.5) to autonomously manage org-mode publishing workflows for wal.sh. The experiment demonstrates how agentic AI can handle complex, multi-step publishing tasks with minimal human intervention.
the workflow
traditional approach
Previously, publishing involved:
- Write content in org-mode
- Run Emacs batch export manually
- rsync files to remote server
- Verify deployment succeeded
Each step required context switching and manual verification.
agentic approach
With Claude Code, the workflow becomes:
- Describe what you want to publish
- Agent handles everything: file creation, export, deployment, verification
The agent autonomously:
- Creates or edits org files
- Runs Emacs publish commands
- Verifies deployment via
version.jsonendpoint - Tracks work in
beadsissue tracker - Commits and pushes changes
key components
tramp-based publishing
The breakthrough was eliminating rsync entirely. Using Emacs TRAMP, org-mode can publish directly to remote servers via SSH:
(setq org-publish-project-alist `(("wal-sh-remote" :base-directory ,base-dir :publishing-directory "/ssh:jwalsh@www.wal.sh:/var/www/wal.sh/" ...)))
This means the agent can publish without any file transfer step - TRAMP handles SSH transparently.
deployment verification
Created version.json endpoint for automated deployment verification:
{
"sha": "a1ed6c5",
"timestamp": "2025-12-21T17:45:00Z",
"status": "deployed"
}
The agent can fetch this after publishing to confirm the deployment succeeded.
beads issue tracking
Using beads/bd for distributed, git-backed issue tracking designed for AI agents:
bd new feature "Add CSS style prototypes" -p P2 bd close www.wal.sh-e4b bd sync
This gives the agent a way to track multi-session work and maintain context.
what opus 4.5 enables
extended context
With ~200k token context, the agent can:
- Hold entire publishing configuration in memory
- Reference previous changes across the session
- Maintain coherent multi-file edits
tool orchestration
Opus 4.5 excels at chaining tools together:
- Read project-config.el to understand publishing setup
- Create new org file for content
- Run gmake publish
- Fetch version.json to verify
- Create git commit with proper trailer
- Push and sync beads
error recovery
When publishing fails (FreeBSD path issues, missing dependencies), the agent:
- Reads error logs
- Identifies root cause
- Applies fix
- Retries operation
workflow pattern: landing the plane
Every significant change follows this pattern:
- Create/edit content
- git add && git commit with conventional commit message
- git pull –rebase && git push to sync
- bd sync to synchronize issue tracker
- gmake publish to deploy
- Verify via version.json or curl
This ensures no work is lost and deployment is always verified.
challenges and solutions
challenge: FreeBSD compatibility
- Mermaid CLI doesn't work (puppeteer issues)
- Solution: Disable mermaid in batch mode
challenge: CI/CD secrets
- GitHub Actions can't SSH to deploy server
- Solution: Use local/agent publishing, disable CI auto-trigger
challenge: Multi-session context
- Agent loses context between sessions
- Solution: Detailed beads issues + conversation summaries
future directions
- Theme switching: CSS prototype system for user-selectable themes
- Incremental publish: Only publish changed files
- Link validation: Automated broken link detection
- RSS feed: Automatic feed generation
conclusion
Claude Code with Opus 4.5 transforms publishing from a manual, multi-step process into a conversational workflow. The agent handles the mechanical complexity (exports, deployments, verification) while the human focuses on content.
The key insight: give the agent good infrastructure (TRAMP, version endpoints, issue tracking) and it can autonomously manage the entire publishing lifecycle.
resources
- Multi-Agent Workflow Frameworks - deeper dive on agent coordination
- beads/bd - distributed issue tracker for agents
- Claude Code - the CLI tool powering this workflow