.claude/skills/dan-workflow/SKILL.md
Core DAN workflow protocol and conventions injected into all agent contexts
npx skillsauth add RavBogard/DAN dan-workflowInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill defines the shared protocols and conventions that all DAN agents and skills follow. It is referenced via agent-skills: [dan-workflow] in skill frontmatter and injected into agent contexts automatically.
Every unit of work follows the PLAN -> APPLY -> UNIFY -> SUMMARY loop.
No orphan plans. Every PLAN.md must have a corresponding SUMMARY.md. A plan without a summary is incomplete work.
No skipping unify. Even if all tasks pass, the loop is not closed until SUMMARY.md exists and STATE.md is updated.
For plans requiring independent verification, the Executor and Qualifier operate as separate roles:
| Status | Meaning | Action | |--------|---------|--------| | PASS | Output meets all criteria | Proceed to next task | | PASS_WITH_CONCERNS | Output works but has minor issues | Log concerns, proceed | | NEEDS_REVISION | Output has fixable problems | Executor revises, qualifier re-grades | | FAIL | Output fundamentally wrong | Trigger diagnostic routing |
The qualifier never modifies files. The qualifier's judgment is based solely on reading the output and verification results.
When a task fails or produces incorrect output, classify the root cause before applying any fix:
| Root Cause | Description | Action | |------------|-------------|--------| | Intent | Wrong goal -- the plan targets the wrong thing | Escalate to user (checkpoint) | | Spec | Wrong plan -- the task description is incorrect or incomplete | Revise task spec, re-execute | | Code | Wrong implementation -- the code doesn't match the spec | Fix code, re-verify |
Always classify first. Fixing code when the spec is wrong wastes effort. Fixing the spec when the intent is wrong compounds the error.
All state reads and writes go through dan-tools.cjs. Never parse STATE.md with inline regex in agents.
# Read full state
node "$HOME/.claude/dan/bin/dan-tools.cjs" --cwd $PROJECT_DIR state read
# Get specific field
node "$HOME/.claude/dan/bin/dan-tools.cjs" --cwd $PROJECT_DIR state get "Status"
# Set specific field
node "$HOME/.claude/dan/bin/dan-tools.cjs" --cwd $PROJECT_DIR state set "Status" "In progress"
# Patch multiple fields
node "$HOME/.claude/dan/bin/dan-tools.cjs" --cwd $PROJECT_DIR state patch '{"Status":"In progress","Plan":"2 of 4"}'
# Parse frontmatter from any file
node "$HOME/.claude/dan/bin/dan-tools.cjs" --cwd $PROJECT_DIR frontmatter parse path/to/file.md
# Commit with structured result
node "$HOME/.claude/dan/bin/dan-tools.cjs" --cwd $PROJECT_DIR commit "message" --files file1.md file2.md
Why: Regex parsing is fragile and duplicates logic. The CLI centralizes state format knowledge.
DAN operates at exactly two levels:
Agents MUST NOT spawn other agents. If an agent needs work done by another agent, it returns to the skill level, which handles the orchestration.
Why: Nested agent spawning creates uncontrollable recursion, context fragmentation, and unpredictable costs. The two-level rule keeps the system debuggable.
Each agent gets a clean context window. State is passed via files, not agent memory.
Why: Agent context windows are finite and degrade with length. Fresh context ensures each agent operates at peak quality. Files are the universal interface.
testing
Spawn verifier agent to validate phase outputs against requirements and success criteria
tools
Close the loop on a completed plan by writing SUMMARY.md and updating state
tools
Show current project progress, blockers, and suggest the next action
tools
Restore session from STATE.md and continue where work left off