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
25 changes: 25 additions & 0 deletions .archon/commands/defaults/archon-create-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,31 @@ Transform "$ARGUMENTS" into a battle-tested implementation plan through systemat
| Free-form text | Description | Use directly as feature input |
| Empty/blank | Error | STOP - require input |

### 0.1a If the input is a GitHub issue: comments outrank the body

Fetch the issue **with its comments**, and treat them as authoritative:

```bash
gh issue view {number} --json title,body,labels,comments,state,url,author
```
Comment on lines +39 to +45

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Classify GitHub issue inputs before the free-form branch.

The input table above lists only PRD, document, and free-form inputs. It has no GitHub issue number or URL case. Therefore, 1234 or a GitHub issue URL can enter Phase 0.3 and skip this new comment-fetch path. Add number and URL cases before Free-form text, matching .archon/commands/defaults/archon-investigate-issue.md Lines 30-32.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/commands/defaults/archon-create-plan.md around lines 39 - 45, Update
the input classification table in archon-create-plan.md to add GitHub issue
number and URL cases before the Free-form text branch. Match the number and URL
detection patterns and routing used in archon-investigate-issue.md, ensuring
these inputs reach the comment-fetch path before Phase 0.3.


- **Read every comment before planning.** A later maintainer comment supersedes
the body wherever they disagree — the body is the opening position, not the
specification.
- **A comment stating a decision IS the specification.** If one settles a shape,
a field list, an interface, or an explicit "do X, not Y", plan that. Do not
re-derive the choice from the body and do not compromise between them.
Comment on lines +47 to +52

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf 'Files:\n'
for f in \
  ".archon/commands/defaults/archon-create-plan.md" \
  ".archon/commands/defaults/archon-investigate-issue.md" \
  ".archon/commands/defaults/archon-triage-stale.md"
do
  if [ -f "$f" ]; then
    echo "== $f =="
    wc -l "$f"
    ast-grep outline "$f" || true
  fi
done

printf '\nRelevant excerpts:\n'
rg -n -C 3 "verified|maintainer|specification|decision|latest|supersedes|comment" .archon/commands/defaults/archon-create-plan.md .archon/commands/defaults.archon-investigate-issue.md 2>/dev/null || true

Repository: coleam00/Archon

Length of output: 4251


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '== .archon/commands/defaults/archon-investigate-issue.md excerpts ==\n'
sed -n '1,110p' .archon/commands/defaults/archon-investigate-issue.md
sed -n '210,360p' .archon/commands/defaults/archon-investigate-issue.md
sed -n '530,602p' .archon/commands/defaults/archon-investigate-issue.md || true

printf '\n= maintainers/verification checks =\n'
rg -n "verification|trusted|maintainer|team|collaborator|read access|write access|GH\\(|gh issue|issue view|GitHub\\(|GitHub" .archon/commands/defaults/archon-create-plan.md .archon/commands/defaults/archon-investigate-issue.md || true

Repository: coleam00/Archon

Length of output: 12406


Clarify comment-authority in both planning commands.

Both commands say any maintainer comment outranks the issue body, but they do not require verifying that the comment author is an authorized maintainer. Restrict the specification rule to verified maintainer decisions and state latest-decision precedence.

📍 Affects 2 files
  • .archon/commands/defaults/archon-create-plan.md#L47-L52 (this comment)
  • .archon/commands/defaults/archon-investigate-issue.md#L54-L62
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/commands/defaults/archon-create-plan.md around lines 47 - 52, The
comment-authority rules in .archon/commands/defaults/archon-create-plan.md lines
47-52 and .archon/commands/defaults/archon-investigate-issue.md lines 54-62 must
require verified maintainer authorship before treating a comment as
authoritative, and must state that the latest verified maintainer decision takes
precedence. Update both command documents consistently while preserving the
existing planning and investigation guidance.

- **Follow linked issues.** When the body or a comment points at another issue
(`#1234` or a URL) for a decision or contract, fetch that issue and its
comments too. One level of following is enough.
- **If the body and a decision conflict, record which you followed** in the plan.
A silent choice is the failure mode here.

On 2026-08-03 a run planned from an issue body while a maintainer comment on that
same issue — already present in the fetched input — specified a different design.
The resulting PR was discarded. The data was there; nothing said it outranked the
body.

### 0.2 If PRD File Detected

1. **Read the PRD file**
Expand Down
26 changes: 26 additions & 0 deletions .archon/commands/defaults/archon-investigate-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,32 @@ gh issue view {number} --json title,body,labels,comments,state,url,author
- Parse as problem description
- Note: No GitHub posting (artifact only)

### 1.2a Comments outrank the body, and linked issues are part of the input

An issue body describes a problem as first understood. Comments are where it gets
**decided**. Treat them with that authority:

- **Read every comment before planning anything.** A later maintainer comment
supersedes the body wherever the two disagree — the body is the opening
position, not the specification.
- **A comment stating a decision IS the specification.** If one settles a shape,
a field list, an interface, or an explicit "do X, not Y", implement that. Do
not re-derive the choice from the body and do not average the two.
- **Follow linked issues.** When the body or a comment points at another issue
(`#1234`, or a full URL) for a decision, design, or contract, fetch it and read
its comments too:
```bash
gh issue view 1234 --json title,body,comments,state,url
```
Comment on lines +63 to +68

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== changed files/stat =="
git diff --stat || true

echo "== target snippets =="
for f in .archon/commands/defaults/archon-investigate-issue.md .archon/commands/defaults/archon-create-plan.md; do
  if [ -f "$f" ]; then
    echo "--- $f"
    nl -ba "$f" | sed -n '45,80p'
  else
    echo "missing $f"
  fi
done

echo "== gh issue view occurrences =="
rg -n "gh issue view|url parsing|repo " .archon/commands/defaults/archon-*.md || true

echo "== all linked-issue guidance occurrences =="
rg -n "Follow linked issues|follow the link|gh issue view" .archon/commands/defaults || true

Repository: coleam00/Archon

Length of output: 299


🌐 Web query:

GitHub CLI gh issue view syntax --repo owner/repo full URL support

💡 Result:

The GitHub CLI (gh) issue view command supports both issue numbers and full URLs as valid arguments [1]. Syntax: gh issue view { | } [flags] - You can pass an issue number (e.g., gh issue view 123) or a direct URL to the issue (e.g., gh issue view https://github.com/owner/repo/issues/123) [1]. - When working with a repository other than the current directory's local repo, use the --repo (or -R) flag with the [HOST/]OWNER/REPO format [1][2]. Note on syntax constraints: - The command expects the issue number as an integer. Using the # prefix (e.g., gh issue view #123``) is generally not supported, as many shells interpret the # character as the start of a comment and strip it before the command receives the argument [3]. - While there have been community requests to support `owner/repo#number` shorthand syntax, it is not currently integrated into the standard `gh issue view` command interface [4]. When viewing issues, you can use the `--web` flag to open the issue directly in your default web browser rather than displaying it in the terminal [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== changed files/stat =="
git diff --stat || true

for f in .archon/commands/defaults/archon-investigate-issue.md .archon/commands/defaults/archon-create-plan.md; do
  if [ -f "$f" ]; then
    echo "--- $f"
    awk '{printf "%6d  %s\n", NR, $0}' "$f" | sed -n '45,80p'
  else
    echo "missing $f"
  fi
done

echo "== relevant occurrences in target files =="
grep -nE "Follow linked issues|gh issue view|owner/repo|`#1234`|issue URL|URL" .archon/commands/defaults/archon-investigate-issue.md .archon/commands/defaults/archon-create-plan.md || true

echo "== broader linked-issue guidance locations =="
grep -RInE "Follow linked issues|follow the link|gh issue view|owner/repo|`#1234`" .archon/commands/defaults || true

Repository: coleam00/Archon

Length of output: 6593


Preserve the linked issue repository when the reference is a full URL.

gh issue view accepts a full GitHub issue URL, so the #1234 example does not cover cross-repository linked issues. In both command docs, make URL parsing preserve owner/repo and show that URL references include --repo owner/repo, while bare #1234 uses the current repository.

📍 Affects 2 files
  • .archon/commands/defaults/archon-investigate-issue.md#L63-L68 (this comment)
  • .archon/commands/defaults/archon-create-plan.md#L53-L55
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/commands/defaults/archon-investigate-issue.md around lines 63 - 68,
Update the linked-issue guidance in
.archon/commands/defaults/archon-investigate-issue.md lines 63-68 and
.archon/commands/defaults/archon-create-plan.md lines 53-55 to preserve the
owner/repo parsed from full GitHub issue URLs and demonstrate gh issue view with
--repo owner/repo for URL references; explicitly distinguish this from bare
`#1234` references, which should use the current repository.

One level of following is enough — do not spider the whole graph.
- **If the body and a decision conflict, say so in your investigation artifact**
and state which you followed. A silent choice is the failure mode here.

This is not hypothetical. On 2026-08-03 a run implemented an issue's body while a
maintainer comment on that same issue — fetched, present in the input, posted 16
seconds before the run started — specified a different shape entirely. The PR was
discarded. The data was there; nothing said it outranked the body.

### 1.3 Classify Issue Type

| Type | Indicators |
Expand Down
193 changes: 171 additions & 22 deletions .archon/workflows/experimental/archon-fix-github-issue-experimental.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,41 @@ description: |
8. Simplifies changed code (implements fixes directly, not just reports)
9. Reports results back to the GitHub issue with follow-up suggestions

provider: claude
model: sonnet
# Provider-agnostic: no `provider:` here, so every node inherits the install
# default (`defaultAssistant` / `assistants.*` in .archon/config.yaml). Models are
# tier keywords, not literal ids, so the same DAG runs on whatever the install has
# configured for small/medium/large.
model: medium

nodes:
# ═══════════════════════════════════════════════════════════════
# PHASE 0: PREP WORKTREE
# ═══════════════════════════════════════════════════════════════
# A fresh worktree has no installed dependencies, so type-check and tests
# fail before reaching project code. Root node with no depends_on, so it runs
# in parallel with the classify/plan phase and costs no wall-clock — only
# `implement` waits on it. Kept deliberately minimal; add context only if it
# actually fails on a real project.

- id: prep-worktree
prompt: |
Install this project's dependencies so builds, type-checks and tests can run
in this fresh worktree.

Follow this order:

1. Locate the package-manager markers actually present in the repo — lockfiles
and manifests. Decide from evidence, never from convention.
2. Read the manifest head to confirm the manager and any pinned version.
3. Verify that manager responds to a version check before relying on it.
4. Install using the manager's locked mode — the variant that reproduces the
lockfile exactly and fails rather than updating it. The install must not
modify the lockfile.
5. Report one line: the manager you detected, and whether the install succeeded.

Bound every read; never print a whole file.
model: small
Comment on lines +58 to +75

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Add a deterministic failure check to prep-worktree.

This node only asks the model to "Report one line: the manager you detected, and whether the install succeeded." A prompt-based report is advisory: if the model's turn completes normally (even after the install command exits non-zero), the node itself is not forced to fail. implement (Line 304) then proceeds against a broken or partially-installed dependency tree, and later build/type-check/test failures get misattributed to the implementation instead of the environment.

This is the same failure mode the PR explicitly calls out and fixes elsewhere in this file: capture-pr-number's rationale states create-pr's advisory reporting is unreliable because "Being a prompt instruction, it is advisory," and assert-implemented's rationale exists specifically because a node "can decline to change anything ... and still report success." Apply the same principle here: instruct the model to explicitly fail/exit the turn (or add a follow-up deterministic bash check of the install command's exit status) when the locked install fails, instead of relying on narrative text.

Proposed prompt addition
       4. Install using the manager's locked mode — the variant that reproduces the
          lockfile exactly and fails rather than updating it. The install must not
          modify the lockfile.
-      5. Report one line: the manager you detected, and whether the install succeeded.
+      5. If the install command exits non-zero, treat this as a hard failure of this
+         task — do not continue as if it succeeded.
+      6. Report one line: the manager you detected, and whether the install succeeded.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml
around lines 58 - 75, Update the prep-worktree prompt so a failed locked
dependency installation deterministically fails the node rather than merely
being reported in text. In the prep-worktree instructions, require the model to
stop and explicitly fail/exit when the install command returns non-zero, or add
a follow-up deterministic shell check that propagates the install exit status;
preserve the existing manager detection and successful-install reporting
behavior.


# ═══════════════════════════════════════════════════════════════
# PHASE 1: FETCH & CLASSIFY
# ═══════════════════════════════════════════════════════════════
Expand All @@ -58,6 +89,7 @@ nodes:
- If the message is ambiguous (e.g., "fix the SQLite timestamp bug"), use `gh issue list` to search for matching issues and pick the best match.

CRITICAL: Your final output must be ONLY the bare number with no quotes, no markdown, no explanation. Example correct output: 709
model: small

- id: fetch-issue
bash: |
Expand All @@ -79,6 +111,15 @@ nodes:

$fetch-issue.output

## Operator Request

The message that started this run, verbatim. It is often just an issue reference,
but it may add constraints, corrections, or context the issue body lacks — e.g.
naming the real type, flagging that external research is needed, or narrowing
scope. Weigh it alongside the issue, and where the two conflict, prefer this.

$ARGUMENTS

## Type

| Type | Indicators |
Expand Down Expand Up @@ -112,8 +153,7 @@ nodes:

Provide reasoning that covers all three decisions.
depends_on: [fetch-issue]
model: haiku
allowed_tools: []
model: small
output_format:
type: object
properties:
Expand Down Expand Up @@ -221,6 +261,7 @@ nodes:

- id: investigate
command: archon-investigate-issue
output_type: investigation
depends_on: [classify, web-research]
when: "$classify.output.issue_type == 'bug'"
# Allow web-research to be skipped (needs_external_research == 'false') without blocking
Expand All @@ -229,6 +270,7 @@ nodes:

- id: plan
command: archon-create-plan
output_type: plan
depends_on: [classify, web-research]
when: "$classify.output.issue_type != 'bug'"
# Allow web-research to be skipped (needs_external_research == 'false') without blocking
Expand Down Expand Up @@ -258,17 +300,59 @@ nodes:

- id: implement
command: archon-fix-issue
depends_on: [bridge-artifacts]
output_type: implementation
depends_on: [bridge-artifacts, prep-worktree]
context: fresh
model: opus[1m]
model: large

# Hard stop when `implement` produced nothing.
#
# `implement` can decline to change anything — a blocked precondition, an unclear
# plan — and still report success, so the run continued through create-pr and the
# whole review fleet on an empty diff, then reported `completed`. Nine nodes ran
# after the work had already failed. This asks the only question that matters
# deterministically: is there a change to review?
#
# Exiting non-zero fails the node, and therefore the run, before any reviewer or
# PR node spends anything. A run with nothing to show should fail, not go green.
# `.archon/` is excluded deliberately. Archon copies the operator's workflow and
# command edits into every run worktree — that is the feature that lets a workflow
# be iterated on before it is committed — so those files are present BEFORE
# `implement` runs and are not its output. A first version of this guard counted
# them and passed three consecutive runs on an empty implementation, which is the
# exact failure it exists to catch.
#
# Only the working tree is inspected: `implement` leaves its changes uncommitted
# (committing is `create-pr`'s job). If that ever stops being true this guard fails
# a run that did have work — visible and annoying — rather than passing one that
# did not, which is silent. That is the safe direction for it to be wrong in.
- id: assert-implemented
bash: |
base=$BASE_BRANCH
tracked=$(git diff --name-only HEAD -- ':(exclude).archon' | head -1)
untracked=$(git ls-files --others --exclude-standard -- ':(exclude).archon' | head -1)
if commits=$(git rev-list --count "origin/$base..HEAD" 2>/dev/null); then :; else commits=unknown; fi

if [ -n "$tracked" ] || [ -n "$untracked" ]; then
git --no-pager diff --stat HEAD -- ':(exclude).archon' | tail -1
elif [ "$commits" = "unknown" ]; then
echo "WARNING: cannot compare against origin/$base — not failing on an unknown"
elif [ "$commits" != "0" ]; then
echo "$commits commit(s) ahead of origin/$base"
else
echo "implement produced neither a commit nor a working-tree change outside .archon/ — failing before the review phase" >&2
exit 1
fi
depends_on: [implement]
Comment on lines +309 to +346

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Update the stale rationale comment to match the guard's actual logic.

The comment block states: "Only the working tree is inspected: implement leaves its changes uncommitted (committing is create-pr's job). If that ever stops being true this guard fails a run that did have work — visible and annoying — rather than passing one that did not, which is silent."

The bash below it does not match this description: it also computes commits via git rev-list --count "origin/$base..HEAD" (Line 334) and treats a non-zero commit count as evidence of implementation (Lines 340-341). So the guard checks both the working tree and commits ahead of the base branch, not "only the working tree." A future maintainer reading only the comment could reasonably remove the commit-count branch, believing it is dead weight, and reintroduce the exact silent-pass failure this guard exists to prevent.

Update the comment to describe both checks, or explain why the commit-count branch exists despite the stated assumption that implement never commits.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.archon/workflows/experimental/archon-fix-github-issue-experimental.yaml
around lines 309 - 346, Update the rationale comment above assert-implemented to
accurately state that the guard checks both uncommitted working-tree changes
outside .archon/ and commits ahead of origin/$BASE_BRANCH via the commits count.
Remove or revise the claim that only the working tree is inspected, and explain
the commit-count fallback’s purpose without changing the bash logic.


# ═══════════════════════════════════════════════════════════════
# PHASE 5: VALIDATE
# ═══════════════════════════════════════════════════════════════

- id: validate
command: archon-validate
depends_on: [implement]
output_type: validation
depends_on: [assert-implemented]
context: fresh

# ═══════════════════════════════════════════════════════════════
Expand Down Expand Up @@ -322,9 +406,37 @@ nodes:
# PHASE 7: REVIEW
# ═══════════════════════════════════════════════════════════════

# Deterministic PR-number capture.
#
# create-pr asks the MODEL to run `gh pr view --json number` and echo the result
# into $ARTIFACTS_DIR/.pr-number. Being a prompt instruction, it is advisory: on
# 2026-08-03, across four parallel runs, it wrote the ISSUE number twice
# (c77ed1bc -> 2323, 500fa086 -> 2279), skipped the file entirely once
# (3b03cb58), and was correct once. review-scope then resolved a PR that does not
# exist, correctly refused to fabricate a scope.md, and review-classify declined
# every specialist for lack of evidence — while the run still reported success.
# Three of four PRs got one generalist reviewer instead of the intended set.
#
# This has no judgment content and its silent failure guts the entire review
# phase, so it belongs in a node that cannot decline to fire rather than in a
# prompt. Failing here stops the run instead of yielding a green under-reviewed
# pass. (Workflow constitution: the reliability carve-out, not a style rule.)
- id: capture-pr-number
bash: |
pr=$(gh pr view --json number --jq .number 2>/dev/null || true)
if ! printf '%s' "$pr" | grep -qE '^[0-9]+$'; then
echo "capture-pr-number: no PR resolves for the current branch." >&2
echo "The review phase would be scoped against nothing and would still report success." >&2
exit 1
fi
printf '%s' "$pr" > "$ARTIFACTS_DIR/.pr-number"
gh pr view --json url --jq .url > "$ARTIFACTS_DIR/.pr-url" 2>/dev/null || true
echo "{\"pr_number\":\"$pr\"}"
depends_on: [create-pr]

- id: review-scope
command: archon-pr-review-scope
depends_on: [create-pr]
depends_on: [capture-pr-number]
context: fresh

- id: review-classify
Expand All @@ -350,8 +462,7 @@ nodes:

Provide your reasoning for each decision.
depends_on: [review-scope]
model: haiku
allowed_tools: []
model: small
context: fresh
output_format:
type: object
Expand Down Expand Up @@ -387,31 +498,62 @@ nodes:
depends_on: [review-classify]
context: fresh

# Reviewer gates: run when review-classify flags them AND the scope is non-small,
# OR when smoke-validate found the issue claims unreliable (fallback to full review).
# Expression form: A && B || A && C (the condition evaluator has no parens; && binds tighter than ||)
# All four conditional reviewers share one extra-scrutiny term:
# run_<agent> AND (scope is non-small OR the issue's claims did not hold up)
# `when:` has no parentheses by design, so expressing that inline forced
# `A && B || A && C` — four near-identical ~180-char conditions differing only in
# the agent flag. Computing the shared term ONCE here keeps it deterministic
# (script computes, YAML coordinates) and leaves each gate two short comparisons.
#
# Substitutions are injected already shell-quoted, so they are assigned unquoted
# and then quoted normally as locals.
- id: review-gate
bash: |
scope=$classify.output.scope
claims_blob=$smoke-validate.output
# Fail-safe: only SUPPRESS the extra reviewers when the scope is small AND
# the smoke validator positively confirmed the issue's claims. Anything else
# — non-small scope, claims refuted, or smoke-validate producing nothing at
# all (timeout, failure) — biases toward MORE review, never less.
#
# Reads the whole output and greps rather than `$smoke-validate.output.claims_accurate`:
# strict field access fails this node when the producer emitted no JSON, and a
# failed gate silently skips every conditional reviewer downstream. Observed on
# run 7f392748: smoke-validate timed out, this node failed, and the review phase
# quietly dropped from two specialists to one while still reporting success.
if [ "$scope" = "small" ] && printf '%s' "$claims_blob" | grep -q '"claims_accurate"[[:space:]]*:[[:space:]]*"\?true'; then
echo '{"extra_review":"false"}'
else
echo '{"extra_review":"true"}'
fi
depends_on: [review-classify, smoke-validate]
# Run even when smoke-validate failed — that case must reach the fail-safe
# branch above, not skip this node and take the reviewers down with it.
trigger_rule: all_done

# Reviewer gates: the agent's own flag AND the shared extra-scrutiny term.
- id: error-handling
command: archon-error-handling-agent
depends_on: [review-classify]
when: "$review-classify.output.run_error_handling == 'true' && $classify.output.scope != 'small' || $review-classify.output.run_error_handling == 'true' && $smoke-validate.output.claims_accurate == 'false'"
depends_on: [review-classify, review-gate]
when: "$review-classify.output.run_error_handling == 'true' && $review-gate.output.extra_review == 'true'"
context: fresh

- id: test-coverage
command: archon-test-coverage-agent
depends_on: [review-classify]
when: "$review-classify.output.run_test_coverage == 'true' && $classify.output.scope != 'small' || $review-classify.output.run_test_coverage == 'true' && $smoke-validate.output.claims_accurate == 'false'"
depends_on: [review-classify, review-gate]
when: "$review-classify.output.run_test_coverage == 'true' && $review-gate.output.extra_review == 'true'"
context: fresh

- id: comment-quality
command: archon-comment-quality-agent
depends_on: [review-classify]
when: "$review-classify.output.run_comment_quality == 'true' && $classify.output.scope != 'small' || $review-classify.output.run_comment_quality == 'true' && $smoke-validate.output.claims_accurate == 'false'"
depends_on: [review-classify, review-gate]
when: "$review-classify.output.run_comment_quality == 'true' && $review-gate.output.extra_review == 'true'"
context: fresh

- id: docs-impact
command: archon-docs-impact-agent
depends_on: [review-classify]
when: "$review-classify.output.run_docs_impact == 'true' && $classify.output.scope != 'small' || $review-classify.output.run_docs_impact == 'true' && $smoke-validate.output.claims_accurate == 'false'"
depends_on: [review-classify, review-gate]
when: "$review-classify.output.run_docs_impact == 'true' && $review-gate.output.extra_review == 'true'"
context: fresh

# ═══════════════════════════════════════════════════════════════
Expand All @@ -420,8 +562,14 @@ nodes:

- id: synthesize
command: archon-synthesize-review
output_type: review-synthesis
depends_on: [code-review, error-handling, test-coverage, comment-quality, docs-impact]
trigger_rule: one_success
# all_done, not one_success: synthesize only once EVERY reviewer is terminal.
# one_success would let a synthesis stand on a subset if the reviewers ever land
# in different layers, and it reports that partial view as if it were the whole
# review. all_done also still fires when reviewers were skipped by design (the
# common case — the classifier only asks for the relevant specialists).
trigger_rule: all_done
context: fresh

- id: self-fix
Expand All @@ -444,5 +592,6 @@ nodes:

- id: report
command: archon-issue-completion-report
output_type: completion-report
depends_on: [simplify]
context: fresh
Loading
Loading