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
3 changes: 2 additions & 1 deletion .archon/commands/defaults/archon-implement-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ Write the prepared body to `$ARTIFACTS_DIR/pr-body.md`, then:

```bash
gh pr create --title "Fix: {title} (#{number})" \
--body-file $ARTIFACTS_DIR/pr-body.md
--body-file $ARTIFACTS_DIR/pr-body.md \
--base $BASE_BRANCH
```

### 8.3 Get PR Number
Expand Down
17 changes: 16 additions & 1 deletion .archon/workflows/defaults/archon-architect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ nodes:
1. Stage all changes and create a single commit (or verify existing commits)
2. Push the branch: `git push -u origin HEAD`
3. Check if a PR already exists: `gh pr list --head $(git branch --show-current)`
4. Create the PR with:
4. Create the PR targeting `$BASE_BRANCH` as the base branch:
`gh pr create --base $BASE_BRANCH --title "..." --body "..."`
- Title: concise description of what was simplified (under 70 chars)
- Body: use the format below
5. Save the PR URL to `$ARTIFACTS_DIR/.pr-url`
Expand Down Expand Up @@ -357,3 +358,17 @@ nodes:
additionalContext: >
Verify this command succeeded. If git push or gh pr create failed,
read the error message carefully before retrying.

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [create-pr]
14 changes: 14 additions & 0 deletions .archon/workflows/defaults/archon-feature-development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,17 @@ nodes:
command: archon-create-pr
depends_on: [implement]
context: fresh

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [create-pr]
16 changes: 15 additions & 1 deletion .archon/workflows/defaults/archon-fix-github-issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,23 @@ nodes:
# PHASE 7: REVIEW
# ═══════════════════════════════════════════════════════════════

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [create-pr]

- id: review-scope
command: archon-pr-review-scope
depends_on: [create-pr]
depends_on: [verify-pr-base]
context: fresh

- id: review-classify
Expand Down
16 changes: 15 additions & 1 deletion .archon/workflows/defaults/archon-idea-to-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,23 @@ nodes:
# PHASE 6: CODE REVIEW
# ═══════════════════════════════════════════════════════════════════

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [finalize-pr]

- id: review-scope
command: archon-pr-review-scope
depends_on: [finalize-pr]
depends_on: [verify-pr-base]
context: fresh

- id: sync
Expand Down
16 changes: 15 additions & 1 deletion .archon/workflows/defaults/archon-issue-review-full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,23 @@ nodes:
# PHASE 3: CODE REVIEW
# ═══════════════════════════════════════════════════════════════════

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [implement]

- id: review-scope
command: archon-pr-review-scope
depends_on: [implement]
depends_on: [verify-pr-base]
context: fresh

- id: sync
Expand Down
14 changes: 14 additions & 0 deletions .archon/workflows/defaults/archon-piv-loop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -754,3 +754,17 @@ nodes:
All checks passed.
===============================================================
```

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [finalize]
16 changes: 15 additions & 1 deletion .archon/workflows/defaults/archon-plan-to-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,23 @@ nodes:
# PHASE 6: CODE REVIEW
# ═══════════════════════════════════════════════════════════════════

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [finalize-pr]

- id: review-scope
command: archon-pr-review-scope
depends_on: [finalize-pr]
depends_on: [verify-pr-base]
context: fresh

- id: sync
Expand Down
16 changes: 15 additions & 1 deletion .archon/workflows/defaults/archon-ralph-dag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -648,13 +648,27 @@ nodes:
max_iterations: 15
fresh_context: true

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [implement]

# ═══════════════════════════════════════════════════════════════
# NODE 5: COMPLETION REPORT
# Reads final state and produces a summary.
# ═══════════════════════════════════════════════════════════════

- id: report
depends_on: [implement]
depends_on: [verify-pr-base]
prompt: |
# Completion Report

Expand Down
18 changes: 17 additions & 1 deletion .archon/workflows/defaults/archon-refactor-safely.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,9 @@ nodes:
1. Stage all changes and create a final commit if there are uncommitted changes
2. Push the branch: `git push -u origin HEAD`
3. Check if a PR already exists: `gh pr list --head $(git branch --show-current)`
4. Create the PR with the format below
4. Create the PR targeting `$BASE_BRANCH` as the base branch:
`gh pr create --base $BASE_BRANCH --title "..." --body "..."`, then format
title/body per the template below
5. Save the PR URL to `$ARTIFACTS_DIR/.pr-url`

## PR Format
Expand Down Expand Up @@ -509,3 +511,17 @@ nodes:
additionalContext: >
Verify this command succeeded. If git push or gh pr create failed,
read the error message carefully before retrying.

- id: verify-pr-base
bash: |
set -euo pipefail
EXPECTED="$BASE_BRANCH"
ACTUAL=$(gh pr view --json baseRefName -q '.baseRefName')
if [ "$ACTUAL" != "$EXPECTED" ]; then
PR_NUMBER=$(gh pr view --json number -q '.number')
echo "Base mismatch on PR #$PR_NUMBER: expected=$EXPECTED actual=$ACTUAL — re-targeting" >&2
gh pr edit "$PR_NUMBER" --base "$EXPECTED"
else
echo "PR base verified: $EXPECTED"
fi
depends_on: [create-pr]
Loading
Loading