원클릭으로
generate-claude-md
Generate a project-specific CLAUDE.md file from .claude/dso-config.conf and the Digital Service Orchestra template
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Generate a project-specific CLAUDE.md file from .claude/dso-config.conf and the Digital Service Orchestra template
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when the user wants a comprehensive multi-issue health pass — fix all bugs, resolve broken tests, clear CI failures, fix lint and type errors, restore green builds — not for a single targeted bug fix. Diagnoses and resolves every outstanding open bug ticket plus all validation failures (test, lint, type, format, infrastructure) using orchestrated sub-agents with TDD discipline, in tier order. Trigger phrases include 'debug everything', 'fix all bugs', 'fix the failing tests', 'CI is failing', 'build is broken', 'clean up the codebase', 'restore green', 'project health pass'.
Use when wrapping up a worktree session — closing tasks, finishing work, or merging the branch back to main. Closes completed tickets, sweeps orphaned epics, extracts technical learnings, files bug tickets for unfixed failures, commits remaining changes, syncs the tickets branch, merges to main via merge-to-main.sh, verifies the worktree is merged and clean for claude-safe auto-removal, and prints a task summary. Trigger phrases include 'end session', 'wrap up', 'finish', 'done for now', 'close out', 'merge to main and clean up', 'session complete', 'wrap up this branch'.
Use when the user is stuck in a merge conflict, rebase conflict, failed pull, or any git operation that left conflict markers in the working tree. Dispatches a conflict-analyzer sub-agent that classifies each conflicted hunk by confidence (auto-resolvable vs needs-human-review), auto-resolves high-confidence cases, validates the result, and rolls back if validation fails before falling through to human review. Trigger phrases include 'merge conflict', 'resolve conflicts', 'rebase conflict', 'git conflict', 'conflict markers', 'failed rebase', 'git pull conflict', 'fix the conflicts', 'help with this merge'.
Manual review escalation when CI llm-review blocks a PR on a finding that looks like a false positive. Dispatches dso:code-reviewer-standard at opus tier on the PR's diff, parses the result, and emits a force-merge clearance when zero critical/important/fragile findings remain. Use ONLY when CI llm-review has failed on a suspect FP; not for routine PR shipping. Trigger phrases include 'force merge this PR', 'the CI review is wrong', 'false positive from llm-review', 'manual review override', 'FP recovery'.
Use when the user wants to execute an epic, run a sprint, work through a planned epic's stories and tasks, or coordinate multi-agent task execution end-to-end. Routes the epic by complexity (SIMPLE → direct implementation-plan, MODERATE → lightweight preplanning, COMPLEX → full preplanning), runs an SC-coverage gate at haiku/sonnet/opus tiers to confirm story coverage of epic success criteria, plans the task graph, dispatches sub-agents in batches with file-overlap and semantic-conflict checks, runs per-task review and post-batch validation (test gate, lint, AC verification, visual verification for UI), commits/pushes results, and verifies epic completion via the dso:completion-verifier agent before close. Trigger phrases include 'work the epic', 'execute the sprint', 'run the epic', 'sprint this epic', 'work through the stories', 'implement the planned tasks', 'kick off the sprint'.
Use when breaking down an epic into user stories, story splitting, backlog grooming, defining acceptance criteria, or auditing and reconciling existing epic children before implementation. Dispatches an opus `dso:story-decomposer` sub-agent to draft prioritized vertical-slice user stories with measurable done definitions tied to epic Success Criteria (never inline), identifies dependencies, runs an adversarial red-team review pass, dispatches a UI designer for UI stories, and writes the story tickets to the tracker. Trigger phrases include 'break down this epic', 'split into stories', 'story splitting', 'backlog grooming', 'write user stories', 'define acceptance criteria', 'plan the epic', 'decompose the epic', 'reconcile epic children'.
| name | generate-claude-md |
| description | Generate a project-specific CLAUDE.md file from .claude/dso-config.conf and the Digital Service Orchestra template |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
Generate or update a project's CLAUDE.md by rendering the Digital Service Orchestra template with project-specific command values from .claude/dso-config.conf.
/dso:generate-claude-md # Generate CLAUDE.md for current directory
/dso:generate-claude-md [project-dir] # Generate for a specific project directory
Load the project's command values via read-config.sh (located at .claude/scripts/dso read-config.sh):
PLUGIN_SCRIPTS="${CLAUDE_PLUGIN_ROOT}/scripts"
VALIDATE_CMD=$(bash "$PLUGIN_SCRIPTS/read-config.sh" commands.validate) # shim-exempt: internal orchestration script
FORMAT_CMD=$(bash "$PLUGIN_SCRIPTS/read-config.sh" commands.format) # shim-exempt: internal orchestration script
TEST_CMD=$(bash "$PLUGIN_SCRIPTS/read-config.sh" commands.test) # shim-exempt: internal orchestration script
LINT_CMD=$(bash "$PLUGIN_SCRIPTS/read-config.sh" commands.lint) # shim-exempt: internal orchestration script
Resolution order used by read-config.sh:
.claude/dso-config.conf at $(pwd)/.claude/dso-config.conf (project root — canonical path)make <target> conventionRead the CLAUDE.md template from the plugin:
TEMPLATE_FILE="${CLAUDE_PLUGIN_ROOT}/templates/CLAUDE.md.template"
TEMPLATE_CONTENT=$(cat "$TEMPLATE_FILE")
Replace {{key}} placeholders with resolved config values using sed or bash parameter expansion:
GENERATED=$(echo "$TEMPLATE_CONTENT" \
| sed "s|{{commands.validate}}|${VALIDATE_CMD}|g" \
| sed "s|{{commands.format}}|${FORMAT_CMD}|g" \
| sed "s|{{commands.test}}|${TEST_CMD}|g" \
| sed "s|{{commands.lint}}|${LINT_CMD}|g")
All placeholder tokens use the {{commands.validate}}, {{commands.format}}, {{commands.test}}, and {{commands.lint}} format (mustache-style double braces).
The Quick Reference table in the rendered output maps each workflow action to the project-specific command resolved from config. Example output for a python-poetry project:
| Action | Command | When Run |
|---|---|---|
| Validate all | .claude/scripts/dso validate.sh --ci | Runs automatically at start of /dso:sprint |
| Format code | make format | Only if auto-format hook reports failure |
| Run tests | make test | Before pushing, CI |
| Lint | make lint | After creating classes |
To merge the generated output with an existing CLAUDE.md, preserve the following project-specific sections from the existing file:
## Architecture — stack, pipeline, patterns, env vars## Critical Rules > Architectural Invariants — project-specific structural boundaries## Task Start Workflow — project-specific start flow## Multi-Agent Orchestration — project-specific sub-agent rules## Common Fixes — project-specific troubleshooting tableReplace or update the following generated sections:
## Quick Reference — command table (always replace from generated output)## Working Directory & Paths — standard guidance (replace from generated output)## Critical Rules > Never Do These — workflow safety rules (replace from generated output)## Critical Rules > Always Do These — workflow rules (replace from generated output)The generated sections are delimited by:
<!-- === GENERATED BY /dso:generate-claude-md — DO NOT EDIT MANUALLY ===
...
=== END GENERATED HEADER === -->
Do not overwrite content outside these delimiters without user confirmation.
Write the generated sections to stdout with clear section markers, then offer to write to CLAUDE.md:
=== GENERATED BY /dso:generate-claude-md ===
[rendered content]
=== END GENERATED CONTENT ===
Ask: "Write this to CLAUDE.md in [project-dir]? (yes/no/preview-diff)"
If the user confirms, write the file. If CLAUDE.md already exists, show a diff of what will change before writing.
Escalate to the user (do not proceed autonomously) when:
make placeholder that does not match the project's actual toolchain, ask the user to update .claude/dso-config.conf first.CLAUDE.md contains custom content in Quick Reference or Never Do These sections that would be lost, show a diff and require explicit user confirmation before proceeding.${CLAUDE_PLUGIN_ROOT}/templates/CLAUDE.md.template does not exist, report the missing path and abort.| Situation | Response |
|---|---|
.claude/dso-config.conf not found | Use make-convention fallbacks; warn user that no config was found |
| Template file missing | Report missing path, abort |
| Commands resolve to empty string | Report which commands are empty, escalate to user |
CLAUDE.md already exists | Show diff, require confirmation before overwrite |
| Merge would lose project-specific sections | Escalate, do not proceed without user confirmation |