Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
6be5c61
chore(homebrew): update formula to v0.3.6
Wirasm Apr 12, 2026
9546ea7
feat(providers): add GitHub Copilot community provider
popemkt Apr 21, 2026
f412b83
feat(providers/copilot): wire tool restrictions
popemkt Apr 21, 2026
94b7f47
feat(providers/copilot): wire MCP servers
popemkt Apr 21, 2026
a198290
feat(providers/copilot): wire skills
popemkt Apr 21, 2026
d7719bb
feat(providers/copilot): wire best-effort structured output
popemkt Apr 21, 2026
8a3504d
fix(providers/copilot): address PR review findings
popemkt Apr 21, 2026
31d94d4
feat(providers/copilot): wire sub-agents
popemkt Apr 21, 2026
bc25dee
fix: detect completion signal in any XML tag, not just <promise> (#11…
Wirasm Apr 22, 2026
d7f36b2
fix(web): allow deleting nodes from Workflow Builder (#971) (#1113)
medevs Apr 22, 2026
817186d
fix(workflows): make archon-adversarial-dev sed replacement macOS-saf…
LaplaceYoung Apr 22, 2026
6fea392
fix(workflows): filter user-plugin MCP noise out of workflow warnings…
Wirasm Apr 22, 2026
e0b57a8
fix(providers/copilot): make vendor-path binary-resolver test hermetic
Apr 22, 2026
ae2d936
fix(deps): override transitive axios to ^1.15.0 for CVE-2025-62718 (#…
Wirasm Apr 22, 2026
056707d
fix(cli): surface stale-workspace registration error instead of fake …
Wirasm Apr 22, 2026
d5c1cd9
fix(server,web,workflows): web approval gates auto-resume + reject-wi…
Wirasm Apr 22, 2026
7000f9b
Release 0.3.7
Wirasm Apr 22, 2026
48c81d3
Merge pull request #1352 from coleam00/dev
Wirasm Apr 22, 2026
0de826c
fix(build): drop --bytecode from compiled-binary build (#1354)
Wirasm Apr 22, 2026
4397ed1
chore(release-skill): add pre-flight binary smoke + deterministic-CI-…
Wirasm Apr 22, 2026
5294fcd
fix(providers/pi): lazy-load Pi SDK to unbreak compiled archon binary…
Wirasm Apr 22, 2026
e646cd4
Release 0.3.8
Wirasm Apr 22, 2026
8697508
Merge pull request #1356 from coleam00/dev
Wirasm Apr 22, 2026
876abb1
fix(ci): --no-worktree on release-smoke archon-assist invocations (#1…
Wirasm Apr 22, 2026
889ffc2
Release 0.3.9
Wirasm Apr 22, 2026
7fc4761
Merge pull request #1358 from coleam00/dev
Wirasm Apr 22, 2026
4115ea5
chore: update Homebrew formula for v0.3.9
github-actions[bot] Apr 22, 2026
359b6d3
chore(release-skill): use --help (not version) for Step 1.5 smoke pro…
Wirasm Apr 22, 2026
6f86402
chore(test-release-skill): preserve archon-stable across test cycles
Wirasm Apr 22, 2026
e50e649
Merge upstream/dev into emdash/add-copilot-2er
Apr 22, 2026
efd838e
fix(merge): remove stray <<<<<<< HEAD marker left in package.json
Apr 22, 2026
0e9f1c8
fix(providers/pi): install PI_PACKAGE_DIR shim so Pi workflows run in…
Wirasm Apr 22, 2026
b99cee4
feat(providers): autodetect canonical binary install paths for Claude…
Wirasm Apr 22, 2026
f9f8775
fix(providers/test): use os.homedir() instead of $HOME in claude bina…
coleam00 Apr 23, 2026
5957c6e
fix(server): contain Discord login failure so it doesn't kill the ser…
coleam00 Apr 23, 2026
46874ca
docs(script-nodes): dedicated guide + teach the archon skill (#1362)
Wirasm Apr 24, 2026
2c15439
docs/skill: general hardening — fix inaccuracies, fill workflow/CLI/e…
Wirasm Apr 24, 2026
ad13d83
chore(workflows): switch default Opus pin to opus[1m] alias (#1395)
Wirasm Apr 24, 2026
f094f2a
fix(workflow): migrate piv-loop plan handoff to $ARTIFACTS_DIR (#1398)
coleam00 Apr 24, 2026
a57d628
test(workflows): add anyFailed status derivation coverage for DAG exe…
coleam00 Apr 24, 2026
9122673
docs/skill: add parameter-matrix.md quick-lookup reference
coleam00 Apr 24, 2026
b286ad9
docs: point contributors at PR template and Closes #N convention
Wirasm Apr 27, 2026
d35b193
feat(workflows): add maintainer-standup workflow for daily PR/issue t…
Wirasm Apr 27, 2026
3868f89
feat(workflows): support explicit tags in workflow YAML (#1190)
lraphael Apr 27, 2026
bf8734b
fix(copilot): address CodeRabbit review on PR #1351
popemkt Apr 27, 2026
6c94355
feat(workflows): add maintainer-review-pr and group maintainer workfl…
Wirasm Apr 27, 2026
686bec6
feat(pi): use ModelRegistry to support custom models and skip auth fo…
matt2000 Apr 27, 2026
4929c54
chore(workflows): group smoke-test workflows under test-workflows/ + …
Wirasm Apr 27, 2026
ef950ff
fix(maintainer-review): address CodeRabbit findings on #1430 (#1432)
Wirasm Apr 27, 2026
e2a4427
fix(workflows): approval gate bypass after reject-with-redraft on res…
Wirasm Apr 27, 2026
8cfd598
feat(workflows): add mutates_checkout to allow concurrent runs on liv…
Wirasm Apr 27, 2026
eec09ff
docs: replace String.raw with direct assignment in script node exampl…
Wirasm Apr 27, 2026
06c3f9e
Merge upstream/dev into emdash/add-copilot-2er
popemkt Apr 27, 2026
454dbcb
test(copilot): cover MCP, skills, agents in e2e-copilot-all-features
popemkt Apr 27, 2026
a1d6209
chore(workflows): group experimental workflows under .archon/workflow…
Wirasm Apr 27, 2026
f9bad03
test(copilot): harden skill + agent assertions with unguessable tokens
popemkt Apr 27, 2026
ef16bac
docs(copilot): clarify single-auth-model + drop redundant outer quote…
popemkt Apr 27, 2026
e71c496
fix(workflows): export ARTIFACTS_DIR, LOG_DIR, BASE_BRANCH to bash no…
avro198 Apr 27, 2026
dcfb9d1
fix(workflow): substitute $nodeId.output refs in approval messages (#…
atlas-architect Apr 27, 2026
287bb35
feat(workflows): expose $LOOP_PREV_OUTPUT in loop node prompts (#1286…
voidborne-d Apr 27, 2026
6cf9883
feat(maintainer-standup): surface contributor replies since last run …
Wirasm Apr 28, 2026
2220ffe
feat(maintainer-workflows): cross-workflow review memory (#1458)
Wirasm Apr 28, 2026
0afbeb3
chore(deps): bump claude-agent-sdk to 0.2.121, codex-sdk to 0.125.0 (…
Wirasm Apr 28, 2026
ff90111
fix(claude): stop passing --no-env-file to native binary in dev mode …
Wirasm Apr 28, 2026
784444a
Merge remote-tracking branch 'upstream/dev' into emdash/add-copilot-2er
popemkt Apr 28, 2026
bf1f471
refactor(workflows): trust the SDK for model validation (#1463)
Wirasm Apr 28, 2026
7d06773
fix(cli): lazy-import bundled skill files so non-setup commands don't…
Wirasm Apr 28, 2026
d256c71
fix(docker): register safe.directory for all repos on bind-mount rest…
kagura-agent Apr 29, 2026
ff924e8
feat(maintainer): Pi/Minimax variant of maintainer-standup + dual-for…
Wirasm Apr 29, 2026
a0d4884
fix(providers/pi): tolerate prose preamble in structured-output respo…
Wirasm Apr 29, 2026
fccfe42
fix(workflows): concise failure messages for bash/script nodes (#1389…
Wirasm Apr 29, 2026
cbcca8c
fix(orchestrator): clear stale session ID on error_during_execution t…
kagura-agent Apr 29, 2026
4885ee6
fix(claude): honor CLAUDE_BIN_PATH in dev mode for libc-mismatch host…
Wirasm Apr 29, 2026
d3fc706
Merge remote-tracking branch 'upstream/dev' into emdash/add-copilot-2er
popemkt Apr 29, 2026
4f666c7
refactor(providers/copilot): drop isModelCompatible per #1463
popemkt Apr 29, 2026
2c65569
fix(providers/copilot): lazy-load @github/copilot-sdk to protect comp…
popemkt Apr 29, 2026
8ebacbf
fix(providers/copilot): explicit useLoggedInUser config wins over env…
popemkt Apr 29, 2026
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
125 changes: 125 additions & 0 deletions .archon/commands/maintainer-review-code-review.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
description: Review the PR for code quality, CLAUDE.md compliance, project conventions, and bugs (Pi-tuned)
argument-hint: (no arguments — reads PR data and writes findings artifact)
---

# Maintainer Review — Code Review

You are a focused code reviewer for one GitHub PR. **Always run** for every PR that passes the gate. Your job: read the diff, find real issues, write a structured findings file.

**Workflow ID**: $WORKFLOW_ID

---

## Phase 1: LOAD

### Read the PR number

```bash
PR_NUMBER=$(cat $ARTIFACTS_DIR/.pr-number)
```
Comment on lines +18 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add error handling for missing or empty PR number file.

If $ARTIFACTS_DIR/.pr-number doesn't exist or is empty, the workflow will fail later with unclear errors when attempting to use $PR_NUMBER. Add an explicit check and fail-fast message.

🛡️ Suggested fix with error handling
 ```bash
-PR_NUMBER=$(cat $ARTIFACTS_DIR/.pr-number)
+if [[ ! -f "$ARTIFACTS_DIR/.pr-number" ]]; then
+  echo "Error: $ARTIFACTS_DIR/.pr-number not found. Gate step may have failed."
+  exit 1
+fi
+PR_NUMBER=$(cat "$ARTIFACTS_DIR/.pr-number")
+if [[ -z "$PR_NUMBER" ]]; then
+  echo "Error: PR number is empty in $ARTIFACTS_DIR/.pr-number"
+  exit 1
+fi
</details>

Based on learnings: "Fail Fast + Explicit Errors: prefer throwing early with a clear error for unsupported or unsafe states — never silently swallow errors."

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.archon/commands/maintainer-review-code-review.md around lines 18 - 20, The
script currently reads PR_NUMBER directly from $ARTIFACTS_DIR/.pr-number without
validating it; add a pre-check to ensure the file exists and is non-empty before
assigning PR_NUMBER: test for the existence of "$ARTIFACTS_DIR/.pr-number" and
exit with a clear error message if missing, then read PR_NUMBER and validate it
is not empty (exit with a clear error if it is). Ensure you reference and use
the same variables PR_NUMBER and ARTIFACTS_DIR used in the script so callers
fail fast with an explicit message rather than proceeding with an unset/empty
PR_NUMBER.


### Read the project's rules

Read the repo's `CLAUDE.md` (project-level). It's the source of truth for engineering principles, type-safety rules, eslint policy, error-handling conventions, and forbidden patterns.

### Read the gate decision

```bash
cat $ARTIFACTS_DIR/gate-decision.md
```
Comment on lines +28 to +30
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add error handling for missing gate decision file.

If the gate step failed or was skipped, $ARTIFACTS_DIR/gate-decision.md may not exist. Add an explicit check to fail fast with a clear message.

🛡️ Suggested fix with error handling
 ```bash
+if [[ ! -f "$ARTIFACTS_DIR/gate-decision.md" ]]; then
+  echo "Error: $ARTIFACTS_DIR/gate-decision.md not found. Gate step may not have completed."
+  exit 1
+fi
 cat $ARTIFACTS_DIR/gate-decision.md
</details>

Based on learnings: "Fail Fast + Explicit Errors: prefer throwing early with a clear error for unsupported or unsafe states — never silently swallow errors."

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.archon/commands/maintainer-review-code-review.md around lines 28 - 30, Add
an explicit existence check before attempting to read the gate decision file:
verify that "$ARTIFACTS_DIR/gate-decision.md" exists and if not emit a clear
error message and exit non‑zero, then only run the existing cat
$ARTIFACTS_DIR/gate-decision.md; specifically update the snippet that currently
calls cat to first test [[ -f "$ARTIFACTS_DIR/gate-decision.md" ]] (or
equivalent) and fail fast with a descriptive message if the file is missing so
the script does not silently continue.


The gate already classified direction/scope. Don't re-litigate that here. Focus on **code quality** within the scope the gate accepted.

### Read the PR diff

```bash
gh pr diff $PR_NUMBER
```

If the diff is too large to reason about cleanly, sample: read the diff against each changed file individually with `gh pr diff $PR_NUMBER -- <path>`.

Comment on lines +36 to +41
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Add error handling for gh command failures and clarify sampling strategy.

Two issues:

  1. The gh pr diff command can fail due to auth issues, network problems, or an invalid PR number. Add error handling to fail fast with a clear message.
  2. The guidance on "too large to reason about cleanly" is subjective. Consider providing a concrete threshold (e.g., file count or line count) or suggesting a systematic sampling approach.
🛡️ Suggested fix with error handling
 ```bash
-gh pr diff $PR_NUMBER
+if ! gh pr diff "$PR_NUMBER" > /tmp/pr-diff.txt 2>&1; then
+  echo "Error: Failed to fetch PR diff for #$PR_NUMBER. Check gh auth status."
+  exit 1
+fi
+cat /tmp/pr-diff.txt

-If the diff is too large to reason about cleanly, sample: read the diff against each changed file individually with gh pr diff $PR_NUMBER -- <path>.
+If the diff is too large to reason about cleanly (e.g., > 50 changed files or > 5,000 lines), sample: read the diff against each changed file individually with gh pr diff "$PR_NUMBER" -- <path>. Prioritize files with the most changes or those in critical paths (e.g., packages/core, packages/workflow).

</details>

Based on learnings: "Fail Fast + Explicit Errors: prefer throwing early with a clear error for unsupported or unsafe states."

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @.archon/commands/maintainer-review-code-review.md around lines 36 - 41,
Update the docs/commands to add explicit failure handling and a concrete
sampling guideline: instruct the script/command that invokes gh pr diff to check
the command's exit status and fail fast with a clear error message when gh pr diff "$PR_NUMBER" fails (mentioning auth/network/invalid PR as possible causes)
and to capture its output to a temporary file for inspection; also replace the
vague "too large" guidance with a concrete threshold (e.g., >50 changed files or

5,000 lines) and recommend systematic sampling by running gh pr diff "$PR_NUMBER" -- <path> for files prioritized by change volume or critical
directories (e.g., packages/core, packages/workflow).


</details>

<!-- fingerprinting:phantom:triton:puma:2cb7b664-7e28-43c9-b2aa-9bbaf49fd757 -->

<!-- 4e71b3a2 -->

<!-- This is an auto-generated comment by CodeRabbit -->

---

## Phase 2: ANALYZE

For each changed file, look for:

### Bugs and correctness issues
- Logic errors, off-by-one, null/undefined dereferences, race conditions, resource leaks.
- Incorrect or missing error handling. Silent catches that swallow errors.
- API misuse (wrong types, wrong arguments, deprecated calls).
- Concurrency bugs in async code.

### CLAUDE.md compliance
- TypeScript: explicit return types? No `any` without justification?
- Imports: typed imports for types? Namespace imports for submodules?
- Logging: structured Pino with `{domain}.{action}_{state}` event names?
- Error handling: errors surfaced, not swallowed? `classifyIsolationError` used where appropriate?
- Database: rowCount checks on UPDATEs? Errors logged with context?
- Workflow: schema rules followed? `output_format` for `when:` consumers?

### Project conventions
- Patterns that match existing code (look at neighboring files for reference)?
- Naming, structure, and organization aligned with the rest of the package?
- Cross-package boundaries respected (no `import * from '@archon/core'`, etc.)?

### Bug-likelihood signals
- New conditional branches without tests?
- Hardcoded values that should be configurable?
- TODO / FIXME / HACK / XXX comments left in?

---

## Phase 3: WRITE FINDINGS

Write `$ARTIFACTS_DIR/review/code-review-findings.md` with this structure:

```markdown
# Code Review — PR #<n>

## Summary
<1-2 sentences. State the overall verdict: ready-to-merge / minor-fixes-needed / blocking-issues.>

## Findings

### CRITICAL
- **<file:line>**: <description>
- **Why it matters**: <impact>
- **Suggested fix**: <concrete change>

### HIGH
- (same format)

### MEDIUM
- (same format)

### LOW / NITPICK
- (same format — combine if many)

## CLAUDE.md compliance
<bullet list of any violations, or "Compliant.">

## Notes for synthesizer
<anything the synthesize step should know — e.g., a pattern that needs broader review, a finding that overlaps with another aspect.>
```

If you find nothing to flag, write the file with `## Findings\n\nNone — code looks clean.` and stop. Don't manufacture issues.

Comment on lines +74 to +108
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Ensure the review subdirectory exists before writing findings.

The instructions specify writing to $ARTIFACTS_DIR/review/code-review-findings.md, but there's no guarantee the review/ subdirectory exists. Add a directory creation step to avoid write failures.

Additionally, clarify that the template placeholder <n> in line 79 should be replaced with the actual $PR_NUMBER.

📁 Suggested fix to create directory
 ## Phase 3: WRITE FINDINGS
 
-Write `$ARTIFACTS_DIR/review/code-review-findings.md` with this structure:
+Create the review directory and write `$ARTIFACTS_DIR/review/code-review-findings.md` with this structure:
+
+```bash
+mkdir -p "$ARTIFACTS_DIR/review"
+```
 
 ```markdown
-# Code Review — PR #<n>
+# Code Review — PR #${PR_NUMBER}

Based on learnings: "Fail Fast + Explicit Errors: prefer throwing early with a clear error for unsupported or unsafe states."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.archon/commands/maintainer-review-code-review.md around lines 74 - 108, In
the WRITE FINDINGS step ensure the review output directory exists and the PR
placeholder is substituted: before writing
$ARTIFACTS_DIR/review/code-review-findings.md add mkdir -p
"$ARTIFACTS_DIR/review"; validate required variables (e.g., $ARTIFACTS_DIR and
$PR_NUMBER) and fail fast with a clear error if missing; and replace the
template header "# Code Review — PR #<n>" with "# Code Review — PR
#${PR_NUMBER}" so the actual PR number is written.

---

## Phase 4: RETURN

Return a single line summary as your response:

```
Code review complete. <N> CRITICAL, <N> HIGH, <N> MEDIUM, <N> LOW findings. Verdict: <ready|fixes-needed|blocking>.
```

Don't return the full findings — those live in the artifact. Synthesizer reads the file.

### CHECKPOINT
- [ ] `$ARTIFACTS_DIR/review/code-review-findings.md` written.
- [ ] Each finding has a file path, line number when applicable, and a concrete fix.
- [ ] No invented issues. If clean, say "None."
- [ ] Single-line summary returned.
95 changes: 95 additions & 0 deletions .archon/commands/maintainer-review-comment-quality.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
description: Review the PR's added/modified comments and docstrings for accuracy, value, and long-term maintainability (Pi-tuned)
argument-hint: (no arguments — reads PR data and writes findings artifact)
---

# Maintainer Review — Comment Quality

You are a comment / docstring reviewer. Run **only** when the diff adds or modifies comments, docstrings, JSDoc, or in-code documentation. Your job: keep the code's comments truthful, valuable, and unlikely to rot.

**Workflow ID**: $WORKFLOW_ID

---

## Phase 1: LOAD

```bash
PR_NUMBER=$(cat $ARTIFACTS_DIR/.pr-number)
gh pr diff $PR_NUMBER
```

Read the project's comment policy in `CLAUDE.md`:
- Default to writing **no comments**.
- Only add when the **WHY** is non-obvious (hidden constraint, subtle invariant, workaround).
- Don't explain WHAT (well-named identifiers do that).
- Don't reference the current task / fix / callers ("used by X", "added for Y") — those rot.
- Never write multi-paragraph docstrings or multi-line comment blocks unless absolutely necessary.

---

## Phase 2: ANALYZE

For every added or modified comment in the diff, ask:

### Accuracy
- Does the comment match what the code actually does?
- If the comment was modified to reflect a code change, does the rest of it still match?

### Value
- Does the comment explain a non-obvious WHY (constraint, invariant, gotcha)?
- Or does it restate WHAT the code does? (Restating WHAT = comment rot risk.)
- Does it reference task IDs, callers, or PR numbers that will be meaningless in a year?

### Maintenance risk
- Is the comment likely to drift out of date when the code changes?
- Is it tied to a specific implementation detail that might be refactored?

### Style
- One short line preferred. Multi-line blocks only when truly necessary.
- No trailing summaries that just describe the next line.

---

## Phase 3: WRITE FINDINGS

Write `$ARTIFACTS_DIR/review/comment-quality-findings.md`:

```markdown
# Comment Quality Review — PR #<n>

## Summary
<1-2 sentences. Comment quality: good / minor-issues / significant-rot-risk.>

## Findings

### HIGH — inaccurate comments (don't match the code)
- **<file:line>**: <description>
- **Suggested fix**: <update or remove>

### MEDIUM — comment rot risk
- (same format — references that will rot, restated-what-not-why, multi-paragraph fluff)

### LOW — style / consistency
- (same format)

## Comments that are actually valuable
<optionally call out 1-2 cases where the new comments do a great job of capturing non-obvious WHY. Helps reinforce good patterns.>

## Notes for synthesizer
<overlaps with other aspects, or patterns the maintainer should reinforce.>
```

If comments are clean, write `## Findings\n\nComments are accurate and capture non-obvious WHY where present.` and stop.

---

## Phase 4: RETURN

```
Comment-quality review complete. <N> HIGH, <N> MEDIUM, <N> LOW findings. Quality: <good|minor-issues|significant-rot-risk>.
```

### CHECKPOINT
- [ ] `$ARTIFACTS_DIR/review/comment-quality-findings.md` written.
- [ ] Each HIGH cites the exact comment text and the code it disagrees with.
- [ ] Don't flag every short comment — many are intentionally brief.
118 changes: 118 additions & 0 deletions .archon/commands/maintainer-review-docs-impact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
description: Review whether the PR's user-facing changes (APIs, CLI flags, env vars, behavior) are reflected in documentation (Pi-tuned)
argument-hint: (no arguments — reads PR data and writes findings artifact)
---

# Maintainer Review — Docs Impact

You are a docs-impact reviewer. Run **only** when the diff adds, removes, or renames public APIs, CLI flags, environment variables, or other user-facing behavior. Your job: catch missing or stale documentation.

**Workflow ID**: $WORKFLOW_ID

---

## Phase 1: LOAD

```bash
PR_NUMBER=$(cat $ARTIFACTS_DIR/.pr-number)
gh pr diff $PR_NUMBER
```

Find docs locations:

```bash
ls packages/docs-web/src/content/docs/ 2>/dev/null
ls docs/ 2>/dev/null
ls README.md CONTRIBUTING.md CLAUDE.md 2>/dev/null
```

The project's docs site is at `packages/docs-web/` (Starlight). User-facing docs published to archon.diy. Repo-level docs include `CLAUDE.md`, `CONTRIBUTING.md`, and any `docs/` content.

---

## Phase 2: ANALYZE

For each user-facing change in the diff, identify the docs that should be updated:

### What counts as user-facing
- New CLI command or flag (in `packages/cli/`).
- New environment variable.
- New / removed / renamed API route (in `packages/server/src/routes/`).
- New workflow node type, command file, or workflow YAML field.
- New configuration field in `.archon/config.yaml`.
- Change in default behavior that an existing user would notice.

### What doesn't
- Internal refactors with no API change.
- Test-only changes.
- Bug fixes that restore documented behavior.

### For each user-facing change

- **New surface**: is there a docs page describing it? Is it linked from a landing page or the relevant section?
- **Changed surface**: are existing docs pages still accurate? Do they need updates?
- **Removed surface**: are existing references stale? `grep` the docs site for old name.
- **Migration**: does a breaking change need a migration note in CHANGELOG.md or docs?

### Specific places to check
- `packages/docs-web/src/content/docs/getting-started/` — quickstart, install, concepts.
- `packages/docs-web/src/content/docs/guides/` — workflow authoring, hooks, MCP, scripts.
- `packages/docs-web/src/content/docs/reference/` — CLI, variables, configuration.
- `packages/docs-web/src/content/docs/adapters/` — Slack, Telegram, GitHub, Discord, Web.
- `packages/docs-web/src/content/docs/deployment/` — Docker, cloud.
- `CHANGELOG.md` — Keep-a-Changelog entry for user-visible changes.
- `CLAUDE.md` — only if the change affects how *agents* working in this repo should behave.

---

## Phase 3: WRITE FINDINGS

Write `$ARTIFACTS_DIR/review/docs-impact-findings.md`:

```markdown
# Docs Impact Review — PR #<n>

## Summary
<1-2 sentences. Docs status: in-sync / minor-gaps / significant-gaps.>

## User-facing changes detected
- <change 1> (file:line)
- <change 2>

## Findings

### CRITICAL — missing docs for new public surface
- **<change>**: <description>
- **Where to add**: <path/to/docs/page.md>
- **What to write**: <one-sentence summary>

### HIGH — stale docs from changed/removed surface
- (same format)

### MEDIUM — minor gaps (changelog entry, examples)
- (same format)

### LOW — nice-to-have polish
- (same format)

## Pages that look in-sync
<call out docs that were updated correctly in the same PR — reinforces good practice.>

## Notes for synthesizer
<which aspects overlap, e.g. comment-quality may have flagged the same docstring.>
```

If no user-facing changes, write `## Findings\n\nNo user-facing changes — no docs updates needed.` and stop.

---

## Phase 4: RETURN

```
Docs-impact review complete. <N> CRITICAL, <N> HIGH, <N> MEDIUM, <N> LOW findings. Status: <in-sync|minor-gaps|significant-gaps>.
```

### CHECKPOINT
- [ ] `$ARTIFACTS_DIR/review/docs-impact-findings.md` written.
- [ ] Each CRITICAL/HIGH names a specific doc file path and what's missing.
- [ ] Internal-only changes don't generate findings.
Loading