Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-adversarial-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ nodes:
- id: adversarial-sprint
depends_on: [init-workspace]
idle_timeout: 600000
model: claude-opus-4-6[1m]
model: opus[1m]
loop:
prompt: |
# Adversarial Development — Sprint Loop
Expand Down
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-feature-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: |
nodes:
- id: implement
command: archon-implement
model: claude-opus-4-6[1m]
model: opus[1m]

- id: create-pr
command: archon-create-pr
Expand Down
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-fix-github-issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ nodes:
command: archon-fix-issue
depends_on: [bridge-artifacts]
context: fresh
model: claude-opus-4-6[1m]
model: opus[1m]

# ═══════════════════════════════════════════════════════════════
# PHASE 5: VALIDATE
Expand Down
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-idea-to-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ nodes:
command: archon-implement-tasks
depends_on: [confirm-plan]
context: fresh
model: claude-opus-4-6[1m]
model: opus[1m]

# ═══════════════════════════════════════════════════════════════════
# PHASE 4: VALIDATE
Expand Down
62 changes: 22 additions & 40 deletions .archon/workflows/defaults/archon-piv-loop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,10 @@ nodes:
3. **Read example test files** — understand testing patterns
4. **Check for any recent changes** — `git log --oneline -10`

## Step 2: Determine Plan Location
## Step 2: Plan File Location

Generate a kebab-case slug from the feature name.
Save to `.claude/archon/plans/{slug}.plan.md`.

```bash
mkdir -p .claude/archon/plans
```
Save the plan to `$ARTIFACTS_DIR/plan.md`.
The directory already exists (pre-created by the workflow executor).

## Step 3: Write the Plan

Expand Down Expand Up @@ -282,7 +278,7 @@ nodes:
```
## Plan Created

**File**: `.claude/archon/plans/{slug}.plan.md`
**File**: `$ARTIFACTS_DIR/plan.md`
**Tasks**: {count}
**Files to change**: {count}

Expand Down Expand Up @@ -310,13 +306,9 @@ nodes:

---

## Step 1: Find and Read the Plan
## Step 1: Read the Plan

```bash
ls -t .claude/archon/plans/*.plan.md 2>/dev/null | head -1
```

Read the entire plan file. Also read CLAUDE.md for conventions.
Read `$ARTIFACTS_DIR/plan.md` and CLAUDE.md for conventions.

## Step 2: Process Feedback

Expand Down Expand Up @@ -375,10 +367,10 @@ nodes:
bash: |
set -e

PLAN_FILE=$(ls -t .claude/archon/plans/*.plan.md 2>/dev/null | head -1)
PLAN_FILE="$ARTIFACTS_DIR/plan.md"

if [ -z "$PLAN_FILE" ]; then
echo "ERROR: No plan file found in .claude/archon/plans/"
if [ ! -f "$PLAN_FILE" ]; then
echo "ERROR: No plan file found at $ARTIFACTS_DIR/plan.md"
exit 1
fi

Expand All @@ -403,8 +395,12 @@ nodes:
echo ""
echo "=== PLAN_END ==="

TASK_COUNT=$(grep -c "^### Task [0-9]" "$PLAN_FILE" || true)
echo "TASK_COUNT=${TASK_COUNT:-0}"
TASK_COUNT=$(grep -c "^### Task [0-9]" "$PLAN_FILE" 2>/dev/null || echo "0")
if [ "$TASK_COUNT" -eq 0 ]; then
echo "ERROR: No '### Task N:' sections found in $PLAN_FILE. Plan may be malformed."
exit 1
fi
echo "TASK_COUNT=${TASK_COUNT}"

# ═══════════════════════════════════════════════════════════════
# PHASE 3b: IMPLEMENT — Task-by-Task Loop (Ralph pattern)
Expand All @@ -415,7 +411,7 @@ nodes:
- id: implement
depends_on: [implement-setup]
idle_timeout: 600000
model: claude-opus-4-6[1m]
model: opus[1m]
loop:
prompt: |
# PIV Loop — Implementation Agent
Expand Down Expand Up @@ -447,7 +443,7 @@ nodes:
may have changed things. **You MUST re-read from disk:**

1. **Read the plan file** — your implementation guide
2. **Read progress tracking** — check if `.claude/archon/plans/progress.txt` exists
2. **Read progress tracking** — check if `$ARTIFACTS_DIR/progress.txt` exists
3. **Read CLAUDE.md** — project conventions and constraints

### 0.3 Check Git State
Expand Down Expand Up @@ -514,13 +510,9 @@ nodes:
)"
```

<<<<<<< HEAD
Track progress in `.claude/archon/plans/progress.txt`:
=======
**Never stage**: `.pr-body.md`, `pr-body.md`, `*.scratch.md`, `*.tmp.md`, `review/`, `*-report.md` at the repo root, or anything under `$ARTIFACTS_DIR`.

Track progress in `$ARTIFACTS_DIR/progress.txt`:
>>>>>>> 8295ece7 (fix(workflows): stop sweeping scratch artifacts from every git add -A site (#1506))
```
## Task {N}: {title} — COMPLETED
Date: {ISO date}
Expand Down Expand Up @@ -561,11 +553,9 @@ nodes:

---

## Step 1: Find and Read the Plan
## Step 1: Read the Plan

```bash
ls -t .claude/archon/plans/*.plan.md 2>/dev/null | head -1
```
Read `$ARTIFACTS_DIR/plan.md` to understand the intended implementation.

## Step 2: Review All Changes

Expand All @@ -590,13 +580,9 @@ nodes:

Fix type errors, lint warnings, missing imports, formatting. Stage only the files you fixed — never `git add -A`. Skip the commit if there were no fixes:
```bash
<<<<<<< HEAD
git add -A && git commit -m "fix: address code review findings" 2>/dev/null || true
=======
git add path/to/file1 path/to/file2 ... # list real fixes only
git status --porcelain # verify nothing scratch/review/PR-body is staged
git diff --cached --quiet || git commit -m "fix: address code review findings"
>>>>>>> 8295ece7 (fix(workflows): stop sweeping scratch artifacts from every git add -A site (#1506))
```

**Never stage**: `.pr-body.md`, `pr-body.md`, `*.scratch.md`, `*.tmp.md`, `review/`, `*-report.md` at the repo root, or anything under `$ARTIFACTS_DIR`.
Expand Down Expand Up @@ -644,11 +630,7 @@ nodes:

## Step 1: Read Context

```bash
ls -t .claude/archon/plans/*.plan.md 2>/dev/null | head -1
```

Read the plan file and CLAUDE.md for conventions.
Read `$ARTIFACTS_DIR/plan.md` and CLAUDE.md for conventions.

## Step 2: Process Feedback

Expand Down Expand Up @@ -732,7 +714,7 @@ nodes:
## Step 1: Push Changes

```bash
git push -u origin HEAD 2>&1 || true
git push -u origin HEAD 2>&1 || echo "WARNING: Push failed — verify remote authentication and branch state before creating the PR."
```

## Step 2: Generate Summary
Expand All @@ -742,7 +724,7 @@ nodes:
git diff --stat $(git merge-base HEAD $BASE_BRANCH)..HEAD
```

Read the plan file and progress tracking for context.
Read `$ARTIFACTS_DIR/plan.md` and `$ARTIFACTS_DIR/progress.txt` for context.

## Step 3: Create PR (if not already created)

Expand Down
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-plan-to-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ nodes:
command: archon-implement-tasks
depends_on: [confirm-plan]
context: fresh
model: claude-opus-4-6[1m]
model: opus[1m]

# ═══════════════════════════════════════════════════════════════════
# PHASE 4: VALIDATE
Expand Down
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-ralph-dag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ nodes:
- id: implement
depends_on: [validate-prd]
idle_timeout: 600000
model: claude-opus-4-6[1m]
model: opus[1m]
loop:
prompt: |
# Ralph Agent — Autonomous Story Implementation
Expand Down
2 changes: 1 addition & 1 deletion .archon/workflows/defaults/archon-refactor-safely.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ nodes:
# ═══════════════════════════════════════════════════════════════

- id: execute-refactor
model: claude-opus-4-6[1m]
model: opus[1m]
prompt: |
You are executing a refactoring plan with strict safety guardrails.

Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- **Cherry-pick batch 7 from upstream — Tier 6 workflow polish (7 commits).** Seven workflow-engine fixes picked from `coleam00/archon` upstream/dev. Three candidates were already absorbed in earlier batches (`4c6ddd99`, `7ea32141`, `bc25deef`); one docs file (`script-nodes.md`) was dropped because the fork hasn't absorbed the prerequisite `46874cab` that creates it. Two pre-existing unresolved conflict markers in `.archon/workflows/defaults/archon-piv-loop.yaml` (left over from an earlier `8295ece7` cherry-pick) were resolved in favor of the safer "explicit list" + "never stage" guidance during this batch — they should never have been committed unresolved in the first place.
- `817186d4` — `archon-adversarial-dev` init-workspace no longer uses non-portable `sed -i`; replaced with a `tmp + mv` pattern that works on both macOS and Linux. Macos-relevant for the fork (#1155).
- `46671c46` — Filters user-plugin MCP failure noise out of workflow warnings. New helpers `parseMcpFailureServerNames` + `loadConfiguredMcpServerNames` parse the SDK's MCP failure lines and only forward those that match the workflow's `mcp:` config — third-party Claude plugins (telegram, notion, etc.) no longer leak into the workflow's user-visible warnings. Provider `⚠️` warnings still pass through verbatim (#1327).
- `d1a7c96f` — Adds direct test coverage for the `anyFailed` status derivation branch in `executeDagWorkflow` (~`dag-executor.ts:2956`): one success + one independent failure must mark the run failed (not completed); multiple successes + one failure still marks it failed; a `trigger_rule: none_failed` skip combined with a sibling failure also marks the run failed. Closes a long-standing test gap (#1403).
- `3a291b48` — `archon-piv-loop` plan handoff migrated to `$ARTIFACTS_DIR/progress.txt` (was `.claude/archon/plans/progress.txt`). Resolves stale conflict markers from the earlier `8295ece7` pick and consolidates piv-loop's progress tracking under the standard artifacts layout (#1398).
- `87234c0b` — Switches the eight bundled default workflows that pinned `claude-opus-4-5-20250929` to the `opus[1m]` alias, so they automatically follow the latest Opus 1M-context model without per-workflow updates (#1395).
- `f342d059` — Approval-gate state-machine fix: after a reviewer rejects with `redraft` and the run is later resumed, the gate would silently bypass to `approved` instead of re-running the redraft prompt. The fix re-checks the gate's `last_action` on resume and properly re-enters the redraft state (#1435).
- `dc83efb2` — Bash and script nodes now produce concise, structured failure messages (exit code, last stderr line, command summary) instead of the previous wall-of-stderr dump, making it much easier to spot the actual failure in chat surfaces. Provider-side errors are unchanged. Docs-page change from upstream (`script-nodes.md`) was dropped because the fork hasn't yet absorbed `46874cab` which creates that file (#1389, #1393).

- **Cherry-pick batch 6 from upstream — Tier 5 setup overhaul + skill docs (3 commits).** The deferred `5e61faf0` from PR #4 is now picked, along with two prerequisite docs commits that ship the skill files `5e61faf0`'s expanded `bundled-skill.ts` references.
- `2c154396` — Skill docs hardening: fixes inaccuracies, fills workflow/CLI/env gaps, adds `references/good-practices.md` and `references/troubleshooting.md`. Also expands `references/workflow-dag.md` with a Workflow-Level Fields section and updates `book/dag-workflows.md` + `book/quick-reference.md` to document seven node types (was four) (#1363).
- `91226735` — Adds `references/parameter-matrix.md` quick-lookup reference and registers it in the SKILL.md routing table.
Expand Down
13 changes: 11 additions & 2 deletions packages/docs-web/src/content/docs/guides/mcp-servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,9 @@ and cannot touch the filesystem or run shell commands.

## Connection Failure Handling

MCP server connections are established when the node starts executing. If a server
fails to connect, you'll see a message like:
MCP server connections are established when the node starts executing. If a
server the **workflow** configured via `mcp:` fails to connect, you'll see a
message like:

```
MCP server connection failed: github (failed)
Expand All @@ -204,6 +205,13 @@ MCP server connection failed: github (failed)
The node continues executing but without the tools from the failed server.
Check your config file path, server command, and environment variables if this happens.

User-level Claude plugin MCPs inherited from `~/.claude/` (e.g. `telegram`,
`notion`) routinely fail to connect inside the headless workflow subprocess
and are **not** surfaced here — they're not actionable for the workflow author.
They appear only in debug logs as `dag.mcp_plugin_connection_suppressed`. Run
the CLI with `--verbose` (or set `LOG_LEVEL=debug` on the server) if you need
to see them.

## Workflow Examples

### GitHub Issue Triage
Expand Down Expand Up @@ -378,6 +386,7 @@ bun run cli workflow run archon-smart-pr-review "Review PR #123"
| `MCP config must be a JSON object` | Top-level value is array or string | Wrap in `{ "server-name": { ... } }` |
| `undefined env vars: VAR_NAME` | Environment variable not set | Export the variable or add it to your `.env` |
| `MCP server connection failed` | Server process crashed or URL unreachable | Check command/URL, test the server standalone |
| Plugin MCP missing from workflow output | User-level plugin MCPs (from `~/.claude/`) are filtered out of workflow warnings | Run with `--verbose` and look for `dag.mcp_plugin_connection_suppressed` |
| `mcp config but uses Codex` | Node resolved to Codex provider | Set `provider: claude` on the node or switch default |
| `Haiku model with MCP servers` | Haiku doesn't support tool search | Use `model: sonnet` or `model: opus` instead |

Expand Down
Loading
Loading