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
8 changes: 4 additions & 4 deletions .github/workflows/installer-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ jobs:
- name: Verify Agents skill packaging and bootstrap
run: bash tests/agents-skill.sh

reviews-skill:
name: Reviews Skill Installation
inspect-skill:
name: Inspect Skill Installation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify Reviews skill packaging and bootstrap
run: bash tests/reviews-skill.sh
- name: Verify Inspect skill packaging and bootstrap
run: bash tests/inspect-skill.sh

unix-installer:
name: Unix Installer (${{ matrix.os }}, ${{ matrix.shell_name }})
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,21 @@ npx skills add ArchAstro/archdev --skill agents
Ask your agent to connect your provider, run a coding session, resume existing
work, or set up Factory.

## Install Reviews independently
## Install Inspect independently

Reviews drives local browser code review: capture changes, stream inline
feedback to the coding agent, fix and verify, then open a fresh snapshot.
It also covers GitHub access through the site, AI review workflows,
publication, and the Jobs handoff for automated PR remediation.

```bash
npx skills add ArchAstro/archdev --skill reviews
npx skills add ArchAstro/archdev --skill inspect
```

Ask your coding agent to open local review and iterate on your feedback. No
Task, PR, or daemon is required for that local loop, and the agent can author
the risk/theme annotations itself with `reviews manifest` and
`reviews local --metadata`, with no model key or ArchDev login.
the risk/theme annotations itself with `inspect manifest` and
`inspect local --metadata`, with no model key or ArchDev login.

## Repository scope

Expand All @@ -146,7 +146,7 @@ installer or CLI is harmless: the installer remains trusted code, and release
archives are checked against checksums published with the release. Existing
compatible CLI executables on PATH are reused without reinstalling them.

`tests/agents-skill.sh`, `tests/jobs-skill.sh`, `tests/reviews-skill.sh`,
`tests/agents-skill.sh`, `tests/jobs-skill.sh`, `tests/inspect-skill.sh`,
`tests/rooms-skill.sh`, and `tests/tasks-skill.sh` exercise packaged Unix skills.
`tests/skill-bootstrap.ps1` checks all five PowerShell bootstraps, including
rejection of untrusted installer bytes before execution. `tests/bootstrap-pins.py`
Expand Down
36 changes: 18 additions & 18 deletions skills/reviews/SKILL.md → skills/inspect/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: reviews
name: inspect
description: Use to run ArchDev local code review in the browser, collect inline feedback and iterate on fixes, open an ArchCode PR or inbox, connect GitHub repository access through the site, configure/run AI review workflows, publish reviewed branches, or hand PR automation to Jobs.
---

Expand All @@ -20,19 +20,19 @@ its absolute executable path on stdout.
Bash/Zsh:

```sh
archdev="$(bash /absolute/path/to/reviews/scripts/bootstrap.sh)"
archdev="$(bash /absolute/path/to/inspect/scripts/bootstrap.sh)"
```

Fish:

```fish
set archdev (bash /absolute/path/to/reviews/scripts/bootstrap.sh)
set archdev (bash /absolute/path/to/inspect/scripts/bootstrap.sh)
```

PowerShell:

```powershell
$archdev = & powershell -NoProfile -File 'C:\absolute\path\to\reviews\scripts\bootstrap.ps1'
$archdev = & powershell -NoProfile -File 'C:\absolute\path\to\inspect\scripts\bootstrap.ps1'
```

Commands below use `"$archdev"`; PowerShell uses `& $archdev`. If bootstrap
Expand All @@ -41,14 +41,14 @@ Do not install/start Jobs simply to open a local review.

| Intent | Command |
| --- | --- |
| Human review of local code | `reviews local --feedback-format jsonl --no-open` |
| Author the review metadata yourself, no model or login | `reviews manifest`, then `reviews local --metadata <file>` |
| Open the Needs review inbox | `reviews inbox` (or `reviews`) |
| Open an existing PR | `reviews open <PR>` |
| Discover/inspect AI review DAGs | `reviews workflows list` / `show <name>` |
| Run an AI review DAG | `reviews workflows run <name> --target <target>` |
| Generate publication JSON only | `reviews generate pull-request` / `metadata` |
| Publish/update a branch PR | `reviews publish` |
| Human review of local code | `inspect local --feedback-format jsonl --no-open` |
| Author the review metadata yourself, no model or login | `inspect manifest`, then `inspect local --metadata <file>` |
| Open the Needs review inbox | `inspect inbox` (or `inspect`) |
| Open an existing PR | `inspect open <PR>` |
| Discover/inspect AI review DAGs | `inspect workflows list` / `show <name>` |
| Run an AI review DAG | `inspect workflows run <name> --target <target>` |
| Generate publication JSON only | `inspect generate pull-request` / `metadata` |
| Publish/update a branch PR | `inspect publish` |

Read [workflows.md](references/workflows.md) for AI review DAG features,
[site-and-publication.md](references/site-and-publication.md) for site/GitHub
Expand All @@ -70,13 +70,13 @@ for code review.
`--model <selector-or-alias>` chooses the metadata model. Without a
session or provider key, or when the human wants your judgment on the
diff, skip this step and follow [agent-metadata.md](references/agent-metadata.md):
`reviews manifest` plus `reviews local --metadata <file>` need neither.
`inspect manifest` plus `inspect local --metadata <file>` need neither.
The CLI refuses a model it cannot reach before freezing anything.
3. Choose a valid local base ref. Default is `origin/main`; use `--base HEAD`
for current working changes without the branch's earlier committed diff,
or the requested branch base. Fetch a known remote ref when needed; do not
assume its local tracking ref is fresh. Review does not rebase the checkout.
4. `reviews local` captures final working-tree contents against the merge base
4. `inspect local` captures final working-tree contents against the merge base
of the chosen ref and HEAD: branch commits plus staged/unstaged and
non-ignored untracked changes. It uses a private temporary index/object
store and a synthetic snapshot SHA; it does not commit to the user's branch
Expand All @@ -91,7 +91,7 @@ selected model provider for semantic metadata; it is not an offline-only mode.
## 3. Launch and open the exact URL

```sh
"$archdev" reviews local --base origin/main --feedback-format jsonl --no-open
"$archdev" inspect local --base origin/main --feedback-format jsonl --no-open
```

1. Start this command in the harness's persistent process/PTY facility. Keep
Expand Down Expand Up @@ -144,7 +144,7 @@ paths, LEFT/RIGHT side, line or line-range coordinates, and body text.
5. Run focused verification for the changed behavior. Explain any finding you
decline with concrete evidence. Preserve useful feedback in the session's
work record so a terminated server does not become the only copy.
6. Launch `reviews local` again after edits, using the intended base. It captures
6. Launch `inspect local` again after edits, using the intended base. It captures
a new snapshot and returns a new URL/session. Open that new URL for another
review pass; the old tab remains an old snapshot. Repeat until the user
accepts the result, pauses/cancels, or an unresolved decision needs input.
Expand All @@ -161,12 +161,12 @@ comments. Use JSONL for reliable draft edits/removals and session attribution;

## 5. Separate local review, publication, and automation

For an existing GitHub PR, use `reviews open`/`inbox` and connect GitHub on the
For an existing GitHub PR, use `inspect open`/`inbox` and connect GitHub on the
site as described in the reference. Local review cannot submit a GitHub review
or post its draft comments to a remote PR. If that is the user's intent, review
the actual remote PR revision and use its authorized web actions.

After local review, publish only when requested with `reviews publish`, then
After local review, publish only when requested with `inspect publish`, then
verify the actual PR/head and hand back the ArchCode URL. The reviewed snapshot
is not an implicit publish approval. Tasks remain optional for publication.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
Use this path when no model access or ArchDev session is available, or when
the human wants your judgment on the diff rather than a model's. You freeze
the change set, write sparse risk, theme, and note annotations against it, and
serve them through the same `reviews local` browser flow. The CLI validates
serve them through the same `inspect local` browser flow. The CLI validates
every annotation against the frozen diff; you supply what a reviewer must look
at. Only publishing the same file to a pull request needs a login.

## 1. Freeze and read the change set

```sh
"$archdev" reviews manifest --base origin/main > manifest.json
"$archdev" inspect manifest --base origin/main > manifest.json
```

The manifest captures committed, staged, unstaged, and non-ignored untracked
changes against the merge base of `--base` and HEAD, the same snapshot rules
as `reviews local`. It prints `files[]` and `changes[]`: the annotatable text
as `inspect local`. It prints `files[]` and `changes[]`: the annotatable text
ranges with `path`, `side`, 1-based `start_line` and `end_line`, and their
`patch`. Binary, rename-only, and mode-only changes appear in `files[]`
without a range and cannot carry annotations. Keep `diff_sha256`; it fences your
Expand All @@ -29,7 +29,7 @@ and do not edit any file between this step and step 3.

Write one UTF-8 JSON file outside the repository, for example in the harness
scratch directory, with schema `archdev.review-metadata.v1`. Read
`"$archdev" reviews guide` for the installed CLI's exact contract; it wins
`"$archdev" inspect guide` for the installed CLI's exact contract; it wins
when this page and the CLI disagree.

```json
Expand Down Expand Up @@ -79,7 +79,7 @@ Rules the CLI enforces, and how to satisfy them:
## 3. Serve it

```sh
"$archdev" reviews local --base origin/main --metadata metadata.json --feedback-format jsonl --no-open
"$archdev" inspect local --base origin/main --metadata metadata.json --feedback-format jsonl --no-open
```

`--metadata` replaces model generation: no `auth status`, no provider, no
Expand All @@ -90,7 +90,7 @@ unchanged. Rerun steps 1 to 3 for another pass after edits.

If the CLI reports that the working tree changed since the manifest ran,
regenerate the manifest and the metadata; do not edit the fence by hand.
`reviews local --no-metadata` serves the diff with no annotations when the
`inspect local --no-metadata` serves the diff with no annotations when the
human only wants to read the change.

## 4. Publish the same file to a pull request
Expand All @@ -100,7 +100,7 @@ Publishing writes GitHub and ArchDev's hosted review store, so it needs
present in the file:

```sh
"$archdev" reviews publish --base main --metadata metadata.json
"$archdev" inspect publish --base main --metadata metadata.json
```

Publish validates the annotations against the exact PR head, sets the PR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ capability server. Do not block local-only review on granting repository access.
## 2. Open the inbox or PR

```sh
archdev reviews inbox
archdev reviews open <owner/repo#123>
archdev --json reviews open <PR-number-or-URL>
archdev inspect inbox
archdev inspect open <owner/repo#123>
archdev --json inspect open <PR-number-or-URL>
```

`reviews` alone opens the Needs review inbox. `open` accepts a positive PR
`inspect` alone opens the Needs review inbox. `open` accepts a positive PR
number (resolved through the checkout's GitHub `origin`), `owner/repo#123`, or
a GitHub/ArchCode PR URL. Pass a full identity when outside its repository.
The CLI hands off to ArchCode; it does not download/review the PR itself.
Expand Down Expand Up @@ -117,8 +117,8 @@ than bypassing a disabled finish/merge action through another endpoint.
## 4. Generate metadata without publishing

```sh
archdev reviews generate pull-request --base main --remote origin
archdev reviews generate metadata --base main --remote origin
archdev inspect generate pull-request --base main --remote origin
archdev inspect generate metadata --base main --remote origin
```

These produce validated JSON without publishing. `pull-request` generates
Expand All @@ -139,14 +139,14 @@ condition rather than describing deterministic fallback prose as an AI review.
## 5. Publish when authorized

```sh
archdev reviews publish --base main --remote origin
archdev inspect publish --base main --remote origin
```

1. Inspect the intended committed branch, current head, remote/base, and working
state. Preserve the user's branch/commit policy; commit only when authorized.
Check ArchDev/model access and `gh auth status`, logging in at the missing
boundary. Review-only operations do not require Jobs setup.
2. `reviews publish` publishes/updates the branch PR and its sparse source
2. `inspect publish` publishes/updates the branch PR and its sparse source
annotations. Use `--pull <number>` to explicitly identify an existing PR
when needed. Tasks are optional; `--task <id>` links one and `--task none`
explicitly skips inferred Task association.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# AI review workflows

Use review workflows for repeatable model-driven inspection of a Git snapshot.
They are separate from the human `reviews local` browser session: running a
They are separate from the human `inspect local` browser session: running a
workflow does not open that browser or collect its comments, and opening local
review does not automatically execute a chosen review DAG.

## 1. Discover and run

```sh
archdev --json reviews workflows list
archdev --json reviews workflows show default
archdev reviews workflows run default --target current-files --output-format json
archdev reviews workflows run default --target branch-commits --output-format json
archdev --json inspect workflows list
archdev --json inspect workflows show default
archdev inspect workflows run default --target current-files --output-format json
archdev inspect workflows run default --target branch-commits --output-format json
```

1. Effective definitions come from project `.archdev/reviews/*.json`, user
Expand Down Expand Up @@ -193,7 +193,7 @@ findings or claiming it passed. An AI review result is evidence, not human
approval. In an ordinary parent TUI, the configured presentation is appended
to the conversation; the parent can then address accepted findings through its
normal edit/test flow. After fixes, rerun the relevant workflow and, when human
review was requested, open a new `reviews local` snapshot.
review was requested, open a new `inspect local` snapshot.

Run `archdev --json check` before executing a new/changed definition. This
validates/compiles effective workflows and model selectors; it does not prove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ $existing = Get-Command archdev -ErrorAction SilentlyContinue
$archdev = if ($existing) { Resolve-ArchDevPath $existing.Source } else { Install-ArchDev }

function Test-Reviews([string]$Binary) {
$helpText = & $Binary reviews local --help 2>$null
if ($LASTEXITCODE -ne 0 -or (($helpText -join "`n") -notmatch "(?m)^Usage: archdev reviews local ")) { return $false }
$helpText = & $Binary reviews workflows run --help 2>$null
if ($LASTEXITCODE -ne 0 -or (($helpText -join "`n") -notmatch "(?m)^Usage: archdev reviews workflows run ")) { return $false }
$helpText = & $Binary reviews manifest --help 2>$null
return ($LASTEXITCODE -eq 0 -and (($helpText -join "`n") -match "(?m)^Usage: archdev reviews manifest "))
$helpText = & $Binary inspect local --help 2>$null
if ($LASTEXITCODE -ne 0 -or (($helpText -join "`n") -notmatch "(?m)^Usage: archdev inspect local ")) { return $false }
$helpText = & $Binary inspect workflows run --help 2>$null
if ($LASTEXITCODE -ne 0 -or (($helpText -join "`n") -notmatch "(?m)^Usage: archdev inspect workflows run ")) { return $false }
$helpText = & $Binary inspect manifest --help 2>$null
return ($LASTEXITCODE -eq 0 -and (($helpText -join "`n") -match "(?m)^Usage: archdev inspect manifest "))
}

if (-not (Test-Reviews $archdev)) {
[Console]::Error.WriteLine("Updating ArchDev because this version lacks Reviews commands.")
[Console]::Error.WriteLine("Updating ArchDev because this version lacks Inspect commands.")
$archdev = Install-ArchDev
}

Expand All @@ -52,5 +52,5 @@ if (-not (Test-Path -LiteralPath $archdev -PathType Leaf)) {
}
& $archdev --version *> $null
if ($LASTEXITCODE -ne 0) { throw "ArchDev version verification failed" }
if (-not (Test-Reviews $archdev)) { throw "Installed ArchDev does not provide Reviews commands" }
if (-not (Test-Reviews $archdev)) { throw "Installed ArchDev does not provide Inspect commands" }
Write-Output $archdev
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ else
executable="$(absolute_path "$install_dir/archdev")"
fi

supports_reviews() {
"$1" reviews local --help 2>/dev/null | grep -Fq "Usage: archdev reviews local " &&
"$1" reviews workflows run --help 2>/dev/null | grep -Fq "Usage: archdev reviews workflows run " &&
"$1" reviews manifest --help 2>/dev/null | grep -Fq "Usage: archdev reviews manifest "
supports_inspect() {
"$1" inspect local --help 2>/dev/null | grep -Fq "Usage: archdev inspect local " &&
"$1" inspect workflows run --help 2>/dev/null | grep -Fq "Usage: archdev inspect workflows run " &&
"$1" inspect manifest --help 2>/dev/null | grep -Fq "Usage: archdev inspect manifest "
}

if ! supports_reviews "$executable"; then
printf 'Updating ArchDev because this version lacks Reviews commands.\n' >&2
if ! supports_inspect "$executable"; then
printf 'Updating ArchDev because this version lacks Inspect commands.\n' >&2
install_archdev || exit 1
executable="$(absolute_path "$install_dir/archdev")"
fi
Expand All @@ -84,8 +84,8 @@ fi
}

"$executable" --version >&2
supports_reviews "$executable" || {
printf 'Installed ArchDev does not provide Reviews commands.\n' >&2
supports_inspect "$executable" || {
printf 'Installed ArchDev does not provide Inspect commands.\n' >&2
exit 1
}
printf '%s\n' "$executable"
Loading