From damascus
Internal orchestration logic for /forge, /forge-plan, and /forge-doc commands. Do not trigger on general document writing or review questions — only when these commands are explicitly invoked.
How this skill is triggered — by the user, by Claude, or both
Slash command
/damascus:ForgeOrchestratorThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Iteratively improve documents through a repeated refinement loop — draft, review in parallel by multiple LLMs, refine until approved.
Iteratively improve documents through a repeated refinement loop — draft, review in parallel by multiple LLMs, refine until approved.
Parse from user input:
-n [number] → max_iterations (default: 3)-o [path] → output_path (default: none)task_descriptionExample: -n 5 -o docs/api/auth.md implement auth → max_iterations=5, output_path="docs/api/auth.md", task="implement auth"
The command passes a Mode field to select the authoring agent:
| Mode | Agent | When |
|---|---|---|
plan | damascus:planner | Implementation plans (Anthropic plan mode) |
doc | damascus:author | Technical documents — API specs, architecture, design docs |
auto | Decide based on task | See below |
damascus:planner for tasks about implementing, building, or changing codedamascus:author for tasks about writing documentsdamascus:planner when ambiguousRetrieve the session ID for tracking:
npx tsx ${CLAUDE_PLUGIN_ROOT}/scripts/get-session-id.ts
Returns JSON with shortId (first 8 characters).
Author ──▶ Save ──▶ Metadata ──▶ Reviewers (parallel) ──▶ Judge
▲ │
└───────────── Needs work ────────────────────────────────┘
damascus:planner or damascus:author via Agent tool (resume on iteration 2+)-o flag > project conventions > ask user (first iteration only)plan-metadata.sh to inject timestamps and session ID.review.md (always full overwrite)For detailed step-by-step procedures and tool invocation examples, consult references/workflow.md.
For the review file template and output format, consult references/review-template.md.
agentId from the initial draft call. On iteration 2+, use Agent(resume: agentId) to preserve the agent's full codebase exploration context. Do NOT spawn a fresh agent each iteration.run_in_background or TaskOutput).review.md completely (Write, not Edit) — compress previous iteration into history row firstnpx claudepluginhub flashwade03/damascus-for-claude-code --plugin damascusOrchestrates complex multi-step tasks with automatic retry, memory, and validation. Useful for breaking down large objectives into verified modules.
Runs a Claude↔Codex convergence loop: Codex reviews a plan, Claude applies fixes, repeats until ALLOW or max-iter. For auto-reviewed plan refinement without manual copypaste.
Runs multi-stage planning pipeline with verification gates and persistent Ralph state for complex tasks spanning 3+ files or unclear scope.