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
47 changes: 27 additions & 20 deletions .github/workflows/installer-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
sleep 1
done
exit 1
- name: Install CLI and dashboard
- name: Install CLI-only release
env:
ARCHDEV_RELEASE_BASE_URL: http://127.0.0.1:8123
ARCHDEV_VERSION: 0.31.0
Expand All @@ -90,7 +90,6 @@ jobs:
mkdir -p "$HOME"
./install.sh
test "$("$HOME/.local/bin/archdev" --version)" = 0.31.0
test -x "$HOME/.local/bin/archdev-dashboard"
test -f "$HOME/${{ matrix.completion_file }}"
- name: Stop fixture server
if: always()
Expand All @@ -101,27 +100,35 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Verify Rooms bootstrap compatibility
shell: pwsh
run: ./tests/rooms-bootstrap.ps1
- name: Build fixture release
shell: pwsh
run: ./scripts/create-windows-fixtures.ps1 -OutputDir "$env:RUNNER_TEMP\release" -Version 0.31.0
- name: Start fixture server
shell: pwsh
run: |
$server = Start-Process python -ArgumentList "-m", "http.server", "8123", "--bind", "127.0.0.1" -WorkingDirectory "$env:RUNNER_TEMP\release" -PassThru
$server.Id | Set-Content "$env:RUNNER_TEMP\server.pid"
Start-Sleep -Seconds 2
- name: Install CLI and dashboard
shell: pwsh
run: |
./install.ps1 -Version 0.31.0 -BaseUrl http://127.0.0.1:8123 -InstallDir "$env:RUNNER_TEMP\bin" -SkipPathUpdate
$cliVersion = & "$env:RUNNER_TEMP\bin\archdev.exe" --version
if ($cliVersion.Trim() -ne "0.31.0") { throw "archdev.exe version mismatch" }
$sidecarVersion = & "$env:RUNNER_TEMP\bin\archdev-dashboard.exe" --version
if ($sidecarVersion.Trim() -ne "0.31.0") { throw "archdev-dashboard.exe is not runnable" }
- name: Stop fixture server
if: always()
- name: Install CLI-only release
shell: pwsh
run: |
if (Test-Path "$env:RUNNER_TEMP\server.pid") {
Stop-Process -Id (Get-Content "$env:RUNNER_TEMP\server.pid") -Force -ErrorAction SilentlyContinue
$serverLog = Join-Path $env:RUNNER_TEMP "server.log"
$serverError = Join-Path $env:RUNNER_TEMP "server-error.log"
$server = Start-Process python -ArgumentList "-m", "http.server", "8123", "--bind", "127.0.0.1" -WorkingDirectory (Join-Path $env:RUNNER_TEMP "release") -RedirectStandardOutput $serverLog -RedirectStandardError $serverError -PassThru
try {
$ready = $false
for ($attempt = 0; $attempt -lt 20; $attempt++) {
if ($server.HasExited) { throw "Fixture server exited before becoming ready" }
try {
Invoke-WebRequest http://127.0.0.1:8123/SHA256SUMS -TimeoutSec 1 | Out-Null
$ready = $true
break
} catch { Start-Sleep -Milliseconds 250 }
}
if (-not $ready) { throw "Fixture server did not become ready" }
./install.ps1 -Version 0.31.0 -BaseUrl http://127.0.0.1:8123 -InstallDir "$env:RUNNER_TEMP\bin" -SkipPathUpdate
$cliVersion = & "$env:RUNNER_TEMP\bin\archdev.exe" --version
if ($cliVersion.Trim() -ne "0.31.0") { throw "archdev.exe version mismatch" }
} catch {
Get-Content $serverLog, $serverError -ErrorAction SilentlyContinue
throw
} finally {
Stop-Process -Id $server.Id -Force -ErrorAction SilentlyContinue
}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ curl -fsSL https://raw.githubusercontent.com/ArchAstro/archdev/main/install.sh |
irm https://raw.githubusercontent.com/ArchAstro/archdev/main/install.ps1 | iex
```

The release archive installs both `archdev` and its `archdev-dashboard`
sidecar. The Unix installer also configures Bash, Zsh, or Fish completions for
the active shell.
The release archive installs `archdev`. The Unix installer also configures
Bash, Zsh, or Fish completions for the active shell.

## Install Rooms independently

Expand Down
10 changes: 4 additions & 6 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ try {
$ActualHash = (Get-FileHash $ArchivePath -Algorithm SHA256).Hash
if ($ActualHash.ToLowerInvariant() -ne $ExpectedHash.ToLowerInvariant()) { throw "Checksum mismatch for $AssetName" }
Expand-Archive -Path $ArchivePath -DestinationPath $ExtractDir -Force
foreach ($Name in @("archdev.exe", "archdev-dashboard.exe")) {
$Source = Join-Path $ExtractDir $Name
if (-not (Test-Path $Source)) { throw "Archive is missing $Name" }
Copy-Item $Source (Join-Path $InstallDir $Name) -Force
}
$Source = Join-Path $ExtractDir "archdev.exe"
if (-not (Test-Path $Source)) { throw "Archive is missing archdev.exe" }
Copy-Item $Source (Join-Path $InstallDir "archdev.exe") -Force
if (-not $SkipPathUpdate) {
$CurrentUserPath = [Environment]::GetEnvironmentVariable("Path", "User")
$Entries = if ($CurrentUserPath) { $CurrentUserPath -split ';' } else { @() }
Expand All @@ -69,7 +67,7 @@ try {
}
}
if (-not $SkipVerify) { & (Join-Path $InstallDir "archdev.exe") --version }
Write-Host "Installed archdev and archdev-dashboard to $InstallDir"
Write-Host "Installed archdev to $InstallDir"
} finally {
Remove-Item $TempRoot -Recurse -Force -ErrorAction SilentlyContinue
}
10 changes: 3 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set -euo pipefail
OWNER="ArchAstro"
REPO="archdev"
BINARY_NAME="archdev"
SIDECAR_NAME="archdev-dashboard"
INSTALL_DIR="${ARCHDEV_INSTALL_DIR:-}"
REQUESTED_VERSION="${ARCHDEV_VERSION:-latest}"
RELEASE_BASE_URL="${ARCHDEV_RELEASE_BASE_URL:-}"
Expand Down Expand Up @@ -112,7 +111,6 @@ asset_url=${ASSET_URL}
checksum_url=${CHECKSUM_URL}
install_dir=${INSTALL_DIR}
binary_path=${INSTALL_DIR}/${BINARY_NAME}
sidecar_path=${INSTALL_DIR}/${SIDECAR_NAME}
EOF
exit 0
fi
Expand Down Expand Up @@ -146,10 +144,8 @@ fi

mkdir -p "$EXTRACT_DIR"
tar -xzf "$ASSET_PATH" -C "$EXTRACT_DIR"
for executable in "$BINARY_NAME" "$SIDECAR_NAME"; do
[[ -f "$EXTRACT_DIR/$executable" ]] || { printf 'Archive is missing %s\n' "$executable" >&2; exit 1; }
install -m 0755 "$EXTRACT_DIR/$executable" "$INSTALL_DIR/$executable"
done
[[ -f "$EXTRACT_DIR/$BINARY_NAME" ]] || { printf 'Archive is missing %s\n' "$BINARY_NAME" >&2; exit 1; }
install -m 0755 "$EXTRACT_DIR/$BINARY_NAME" "$INSTALL_DIR/$BINARY_NAME"

append_once() {
local file="$1" line="$2"
Expand Down Expand Up @@ -198,4 +194,4 @@ fi
if [[ "$SKIP_VERIFY" != true ]]; then
"$INSTALL_DIR/$BINARY_NAME" --version
fi
printf 'Installed %s and %s to %s\n' "$BINARY_NAME" "$SIDECAR_NAME" "$INSTALL_DIR"
printf 'Installed %s to %s\n' "$BINARY_NAME" "$INSTALL_DIR"
8 changes: 2 additions & 6 deletions scripts/create-unix-fixtures.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ if [ "\${1:-}" = "--version" ]; then printf '%s\n' '$VERSION'; exit 0; fi
if [ "\${1:-}" = "completion" ]; then printf '# completion for %s\n' "\${2:-unknown}"; exit 0; fi
exit 0
EOF
cat >"$fixture/archdev-dashboard" <<'EOF'
#!/usr/bin/env sh
exit 0
EOF
chmod +x "$fixture/archdev" "$fixture/archdev-dashboard"
tar -C "$fixture" -czf "$OUTPUT_DIR/archdev-$target.tar.gz" archdev archdev-dashboard
chmod +x "$fixture/archdev"
tar -C "$fixture" -czf "$OUTPUT_DIR/archdev-$target.tar.gz" archdev
rm -rf "$fixture"
done
(
Expand Down
3 changes: 1 addition & 2 deletions scripts/create-windows-fixtures.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ foreach ($Arch in @("arm64", "x64")) {
$Fixture = Join-Path ([IO.Path]::GetTempPath()) ("archdev-fixture-" + [Guid]::NewGuid().ToString("N"))
New-Item -ItemType Directory -Path $Fixture | Out-Null
Copy-Item $FixtureBinary (Join-Path $Fixture "archdev.exe")
Copy-Item (Join-Path $Fixture "archdev.exe") (Join-Path $Fixture "archdev-dashboard.exe")
Compress-Archive -Path (Join-Path $Fixture "archdev.exe"), (Join-Path $Fixture "archdev-dashboard.exe") -DestinationPath (Join-Path $OutputDir "archdev-windows-$Arch.zip")
Compress-Archive -Path (Join-Path $Fixture "archdev.exe") -DestinationPath (Join-Path $OutputDir "archdev-windows-$Arch.zip")
Remove-Item $Fixture -Recurse -Force
}
Remove-Item $FixtureBinaryRoot -Recurse -Force
Expand Down
49 changes: 36 additions & 13 deletions skills/rooms/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,43 @@ Inspect the returned `delivery` object. Pending posts are restarted during the
connection. If `failed` is nonzero, tell the user how many posts were rejected
and give them `failedPath`; do not report those posts as delivered.

For a substantial session, immediately read the latest 15 messages with the
connected Room ID. This is the lightweight Room brief and catches current work
before planning begins.
For a substantial session, read the latest 15 messages and existing approved
records with the connected Room ID before planning:

```sh
"$archdev" --json rooms messages "<connected-room-id>" --limit 15
"$archdev" --json rooms records list "<connected-room-id>" --status approved
```

Recent messages show current work; approved records preserve decisions beyond
that window. If optional records are unavailable, continue with search and
recent messages; do not create schemas or treat the missing records as proof
that no decisions exist.

## Recall and answer

Before planning substantial work, search once for the subsystem, symptom,
Before planning substantial work, begin by searching for the subsystem, symptom,
error, or behavior:

```sh
"$archdev" --json rooms search "<question or sharp topic>"
```

The installed coding agent answers directly from the returned messages; no
resident agent is required. Cite supporting message IDs, senders, and
timestamps. Separate inference from facts. Empty, malformed, or failed results
are inconclusive, not proof that the team has no knowledge.
The installed coding agent answers from server Knowledge results; no resident
agent is required. Each hit's `content` contains indexed text. Read
`raw_content` for the original message's `user_id`, `inserted_at`, and
`metadata` (including `human`, `post_type`, and `refs` when present). Cite that
attribution, date, and available reference links. Knowledge `raw_content.id`
and `metadata.message_id` are internal provenance IDs, not public `msg_` IDs;
do not fabricate a message URL or public lookup from them. Public message IDs
come from message responses. Separate inference from facts and do not invent
missing evidence.

If a successful query is empty or insufficient, try a broader query using the
subsystem, symptom, or exact error. New posts may not yet be indexed; use
`"$archdev" --json rooms search "<topic>" --messages` to check recent messages
directly. Empty, malformed, or failed results are inconclusive. Do not present
an unsuccessful lookup as proof that the team has no knowledge.

Read recent activity at session start and again before committing or opening a
PR:
Expand All @@ -78,7 +98,10 @@ lesson or collision to the user, then verify locally.
For substantial work, publish `start` after the scope is understood. Publish a
`lesson` immediately for a reusable root cause or fix, and `abandoned` when an
approach should not be repeated. Finish with `done` or a named `handoff`.
Questions and handoffs must begin with `@firstname`.
Questions and handoffs must begin with `@firstname`. State the symptom, cause,
decision or rejected approach, and verification when known; avoid routine
progress noise. Use full review URLs and repository file links in `-r` when
available, so another agent can inspect the evidence without guessing a repo.

```sh
"$archdev" --json rooms start "Plain-English headline" -b "One concrete fact" -r "path or PR"
Expand Down Expand Up @@ -106,9 +129,9 @@ For ordinary conversation only, use:
"$archdev" --json rooms post "<connected-room-id>" "<message>"
```

If the repository supplies a harness-owned PR evidence publisher, follow that
repository's instructions before posting `done`; do not invent evidence or
replace the publisher with Room prose. Always include the review reference in
the structured `done` post.
When work has a PR, include its review link plus the intent, useful findings,
and actual verification in the structured `done` post. No separate evidence
capture package is required for Rooms. Follow any additional evidence
requirements of the repository without inventing evidence.

Never post secrets, tokens, customer data, or unreviewed private content.
17 changes: 11 additions & 6 deletions skills/rooms/scripts/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function Install-ArchDev {
$installerUrl = if ($env:ARCHDEV_INSTALLER_URL) {
$env:ARCHDEV_INSTALLER_URL
} else {
"https://raw.githubusercontent.com/ArchAstro/archdev/7c16002d66a004b13812cf675042cb1c50fbf6df/install.ps1"
"https://raw.githubusercontent.com/ArchAstro/archdev/9d50e7ce1e64a731d88cca8ae15ec2c45b1375df/install.ps1"
}
$installDir = if ($env:ARCHDEV_INSTALL_DIR) {
$env:ARCHDEV_INSTALL_DIR
Expand All @@ -30,9 +30,15 @@ function Install-ArchDev {
$existing = Get-Command archdev -ErrorAction SilentlyContinue
$archdev = if ($existing) { Resolve-ArchDevPath $existing.Source } else { Install-ArchDev }

& $archdev rooms start --help *> $null
if ($LASTEXITCODE -ne 0) {
[Console]::Error.WriteLine("Updating ArchDev because this version lacks Rooms lifecycle commands.")
function Test-Rooms([string]$Binary) {
& $Binary rooms start --help *> $null
if ($LASTEXITCODE -ne 0) { return $false }
$helpText = & $Binary rooms search --help 2>$null
return ($LASTEXITCODE -eq 0 -and (($helpText -join "`n") -match '--messages'))
}

if (-not (Test-Rooms $archdev)) {
[Console]::Error.WriteLine("Updating ArchDev because this version lacks Rooms lifecycle or Knowledge search commands.")
$archdev = Install-ArchDev
}

Expand All @@ -41,6 +47,5 @@ if (-not (Test-Path -LiteralPath $archdev -PathType Leaf)) {
}
& $archdev --version *> $null
if ($LASTEXITCODE -ne 0) { throw "ArchDev version verification failed" }
& $archdev rooms start --help *> $null
if ($LASTEXITCODE -ne 0) { throw "Installed ArchDev does not provide Rooms lifecycle commands" }
if (-not (Test-Rooms $archdev)) { throw "Installed ArchDev does not provide Rooms lifecycle and Knowledge search commands" }
Write-Output $archdev
17 changes: 12 additions & 5 deletions skills/rooms/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euo pipefail

installer_revision="7c16002d66a004b13812cf675042cb1c50fbf6df"
installer_revision="9d50e7ce1e64a731d88cca8ae15ec2c45b1375df"
installer_url="${ARCHDEV_INSTALLER_URL:-https://raw.githubusercontent.com/ArchAstro/archdev/${installer_revision}/install.sh}"
install_dir="${ARCHDEV_INSTALL_DIR:-$HOME/.local/bin}"

Expand All @@ -29,8 +29,15 @@ else
executable="$(absolute_path "$install_dir/archdev")"
fi

if ! "$executable" rooms start --help >/dev/null 2>&1; then
printf 'Updating ArchDev because this version lacks Rooms lifecycle commands.\n' >&2
supports_rooms() {
local help_text
"$1" rooms start --help >/dev/null 2>&1 || return 1
help_text="$("$1" rooms search --help 2>/dev/null)" || return 1
grep -Fq -- '--messages' <<<"$help_text"
}

if ! supports_rooms "$executable"; then
printf 'Updating ArchDev because this version lacks Rooms lifecycle or Knowledge search commands.\n' >&2
install_archdev
executable="$(absolute_path "$install_dir/archdev")"
fi
Expand All @@ -41,8 +48,8 @@ fi
}

"$executable" --version >&2
"$executable" rooms start --help >/dev/null 2>&1 || {
printf 'Installed ArchDev does not provide Rooms lifecycle commands.\n' >&2
supports_rooms "$executable" || {
printf 'Installed ArchDev does not provide Rooms lifecycle and Knowledge search commands.\n' >&2
exit 1
}
printf '%s\n' "$executable"
Loading