setup wizardry#109
Conversation
📝 WalkthroughWalkthroughAdds a new interactive/non‑interactive Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as "agentver (CLI)"
participant Setup as "setup command"
participant Scanner as "Agent/Skill Scanner"
participant Manifest as "Manifest/Lockfile (Storage)"
participant Migrator as "migrateSkills"
participant Doctor as "Doctor Checks"
User->>CLI: run `agentver setup`
CLI->>Setup: invoke setup handler
Setup->>Scanner: detect agents & discover skills (project/global)
Scanner-->>Setup: return agents & discovered items
Setup->>Manifest: read manifest & lockfile
Manifest-->>Setup: current managed items
Setup->>User: display or emit discovered items (interactive or JSON)
alt Adopt selected
Setup->>Manifest: compute integrity & prepare entries
Manifest-->>Setup: confirm writes
Setup->>Manifest: write manifest & lockfile (unless dry‑run)
end
alt Canonicalise enabled
Setup->>Migrator: call migrateSkills(...)
Migrator-->>Setup: migration result
end
Setup->>Doctor: run health checks against manifest/storage
Doctor-->>Setup: health check results
Setup->>User: output final summary (JSON or formatted)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
…migration logic The `pkg.packageType` index narrowing wasn't tracked by TS across variable assignments, causing a TS2538 error. The migrate test for non-skill types was asserting old skip-all behaviour instead of the new single-file migration path for AGENT/COMMAND types.
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
packages/cli/src/__tests__/commands/migrate.test.ts (1)
831-854:⚠️ Potential issue | 🟠 MajorPipeline failure: Missing mock setup for AGENT package type.
The test fails because the
getCanonicalSkillPathmock inbeforeEachreturns a hardcoded path for'test-skill', but this test uses'test-agent'. The mock needs to handle the skill name dynamically or be overridden for this test case.The error
"path" argument must be of type string. Received undefinedindicatesresolveReadPathorgetCanonicalSkillPathreturnedundefinedfor'test-agent'.🐛 Proposed fix
describe('non-skill package types', () => { it('skips AGENT type packages with a descriptive reason', async () => { vi.mocked(outputModule.isJSONMode).mockReturnValue(true) manifest = createManifest({ packages: { 'test-agent': createManifestPackage({ source: { type: 'local', path: '/project/.claude/agents/test-agent' }, packageType: 'AGENT', }), }, }) + vi.mocked(canonicalModule.getCanonicalSkillPath).mockReturnValue( + '/project/.agents/skills/test-agent' + ) + vi.mocked(canonicalModule.resolveReadPath).mockReturnValue( + '/project/.claude/agents/test-agent' + ) await migrateSkills(undefined, { yes: true })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/__tests__/commands/migrate.test.ts` around lines 831 - 854, The failing test lacks a mock for getCanonicalSkillPath/resolveReadPath for the package name 'test-agent', so update the test setup to return a valid path for that name (or make the mock dynamic) before calling migrateSkills; specifically, modify the mocked getCanonicalSkillPath used in the beforeEach (or override it within this test) so that when migrateSkills inspects the manifest package 'test-agent' it receives a proper string path (e.g., map any input name to a valid path or handle both 'test-skill' and 'test-agent'), ensuring resolveReadPath/getCanonicalSkillPath do not return undefined.packages/cli/src/commands/migrate.ts (1)
255-266:⚠️ Potential issue | 🟠 MajorLocal single-file packages keep a stale
source.path.For
AGENT/COMMANDentries adopted viapackages/cli/src/commands/setup.ts(Lines 249-263), the local source is stored as the parent directory and the filename lives inentryFile.readPathhere is the entry file, so thesource.path === readPathcheck never matches and the manifest/lockfile keep pointing at the pre-migration location.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/commands/migrate.ts` around lines 255 - 266, The manifest/lockfile update only checks if source.path === readPath, but AGENT/COMMAND single-file packages store the local source as the parent directory with the filename in entryFile, so the equality never matches; update the checks in the migrate logic around manifestEntry and lockfileEntry to also consider the parent directory form (e.g., treat source.path as matching if it equals readPath OR equals path.dirname(readPath)), and when matched assign source.path = canonicalPath (keeping the existing spread behavior) for both manifestEntry and lockfileEntry so single-file local packages get their source.path rewritten to the canonical location.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/__tests__/commands/setup.test.ts`:
- Around line 145-613: Add tests covering the canonicalisation and file-based
package code paths by calling runSetup with the --canonicalise flag (and
--yes/--json as needed), creating scanned files via createScannedFile that set
detectedType to 'AGENT' or 'COMMAND' and include file-based package paths, and
asserting outputModule.outputSuccess contains a canonicalised array and that
manifestModule.readManifest / pairModule.updateManifestAndLockfile are exercised
for AGENT/COMMAND adoption; also add at least one JSON-mode test verifying the
canonicalised entries appear in the JSON envelope and one interactive-mode test
that simulates prompts for canonicalisation choices so the branches in setup.ts
handling canonicalise and file-based packages are executed.
In `@packages/cli/src/commands/adopt.ts`:
- Around line 377-383: The adopt command calls migrateSkills when
options.canonicalise is set which causes duplicate JSON because migrateSkills
itself calls outputSuccess; add a new boolean flag (e.g., suppressOutput or
emitOutput) to the MigrateOptions type checked by migrateSkills, update
migrateSkills to skip calling outputSuccess when that flag is set, and from the
adopt implementation where migrateSkills is invoked (the block that checks
options.canonicalise and calls migrateSkills) pass suppressOutput: true so adopt
alone emits the final JSON via its outputSuccess call; ensure the new option is
optional and defaults to existing behavior to avoid breaking other callers.
In `@packages/cli/src/commands/migrate.ts`:
- Around line 241-244: The rollback logic for the single-file migration doesn't
remove partial symlinks created by createFileSymlinks(), so failed migrations
leave broken links; update the migration rollback to track and remove any
symlinks created before the error (or make createFileSymlinks() return the list
of created links and perform cleanup on failure); specifically modify the block
that calls createFileSymlinks(projectRoot, shortName, category, pkg.agents,
scope) (and the equivalent call around lines 275-277) so that on exception it
iterates the returned/recorded agent link paths and unlinkSync()s them before
restoring readPath and removing canonicalPath, ensuring no partial links remain.
In `@packages/cli/src/commands/setup.ts`:
- Around line 502-516: The setup command currently calls
migrateSkills(undefined, ...) which triggers a full-scope, command-level
migration and its own output/exit behavior; instead, invoke the lower-level
migration routine for only the adopted packages and suppress duplicate command
output. Replace the migrateSkills(undefined, { yes: true, global:
options.global, dryRun: false }) call from the setup flow (after
offerCanonicalisation) with a call that targets adopted (adopted.map(a =>
a.path) or similar) or use the internal per-package migration function used by
migrateSkills, and pass a flag/option to disable its standalone logging/JSON
emission so setup can build the canonicalised array accurately (ensure you
update the call site in setup.ts and use the same unique symbols migrateSkills,
offerCanonicalisation, and the adopted array).
In `@plans/2026-04-02-install-cli-locally-v1.md`:
- Line 64: The phrase "Stale build artifacts" and its later mention of `dist/`
use American spelling; update the wording to British English by replacing
"artifacts" with "artefacts" (e.g., change the bullet to "Stale build artefacts
— If `dist/` contains an older build, the linked binary will be outdated.") and
ensure any other occurrences of "artifact(s)" in this document use "artefact(s)"
consistently.
- Line 40: Replace the hardcoded developer-specific path
"/home/jaythegeek/code/agentver/agentver" in the
plans/2026-04-02-install-cli-locally-v1.md document with a generic placeholder
(for example "<monorepo-root>" or "your local clone of the repository") and
update the surrounding explanatory text to instruct users to substitute their
own clone path; ensure the literal string is replaced wherever it appears in
this file and adjust the heading/comment "# From monorepo root: ..." to read
something like "# From your local clone of the monorepo: <monorepo-root>" so the
document is portable for other contributors.
---
Outside diff comments:
In `@packages/cli/src/__tests__/commands/migrate.test.ts`:
- Around line 831-854: The failing test lacks a mock for
getCanonicalSkillPath/resolveReadPath for the package name 'test-agent', so
update the test setup to return a valid path for that name (or make the mock
dynamic) before calling migrateSkills; specifically, modify the mocked
getCanonicalSkillPath used in the beforeEach (or override it within this test)
so that when migrateSkills inspects the manifest package 'test-agent' it
receives a proper string path (e.g., map any input name to a valid path or
handle both 'test-skill' and 'test-agent'), ensuring
resolveReadPath/getCanonicalSkillPath do not return undefined.
In `@packages/cli/src/commands/migrate.ts`:
- Around line 255-266: The manifest/lockfile update only checks if source.path
=== readPath, but AGENT/COMMAND single-file packages store the local source as
the parent directory with the filename in entryFile, so the equality never
matches; update the checks in the migrate logic around manifestEntry and
lockfileEntry to also consider the parent directory form (e.g., treat
source.path as matching if it equals readPath OR equals path.dirname(readPath)),
and when matched assign source.path = canonicalPath (keeping the existing spread
behavior) for both manifestEntry and lockfileEntry so single-file local packages
get their source.path rewritten to the canonical location.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 871a9a1a-e341-48be-8dee-1f36fe98c250
⛔ Files ignored due to path filters (1)
packages/github-action/dist/index.jsis excluded by!**/dist/**,!**/dist/**
📒 Files selected for processing (12)
apps/dashboard/src/lib/storage/index.tspackages/cli/bin/agentver.tspackages/cli/src/__tests__/commands/adopt.test.tspackages/cli/src/__tests__/commands/migrate.test.tspackages/cli/src/__tests__/commands/setup.test.tspackages/cli/src/commands/adopt.tspackages/cli/src/commands/doctor.tspackages/cli/src/commands/migrate.tspackages/cli/src/commands/setup.tspackages/shared/src/cli-output.tspackages/shared/src/index.tsplans/2026-04-02-install-cli-locally-v1.md
💤 Files with no reviewable changes (1)
- apps/dashboard/src/lib/storage/index.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/cli/src/__tests__/commands/migrate.test.ts (1)
832-853:⚠️ Potential issue | 🟡 MinorTest update is correct, but missing coverage for AGENT/COMMAND migration paths.
The updated test correctly validates that
PLUGIN(and other non-migratable types) are skipped with a descriptive reason. However, the implementation now supports migratingAGENTandCOMMANDpackage types viacopyFileSync/unlinkSync/createFileSymlinks, but there are no tests exercising this happy path.Consider adding test cases that:
- Migrate an
AGENTpackage using the single-file flow- Verify
copyFileSyncandunlinkSyncare called (notcpSync/rmSync)- Verify
createFileSymlinksis called instead ofcreateAgentSymlinks🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/__tests__/commands/migrate.test.ts` around lines 832 - 853, Add tests for the AGENT and COMMAND migration flows to exercise the new single-file path: in the test file add a case that creates a manifest with packageType 'AGENT' (and another for 'COMMAND') and calls migrateSkills(...), then assert that fs.copyFileSync and fs.unlinkSync were invoked (and not fs.cpSync or fs.rmSync), and assert that createFileSymlinks was called while createAgentSymlinks was not; reference the migrateSkills function and the helper functions copyFileSync, unlinkSync, cpSync, rmSync, createFileSymlinks, createAgentSymlinks when locating where to add these assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@packages/cli/src/__tests__/commands/migrate.test.ts`:
- Around line 832-853: Add tests for the AGENT and COMMAND migration flows to
exercise the new single-file path: in the test file add a case that creates a
manifest with packageType 'AGENT' (and another for 'COMMAND') and calls
migrateSkills(...), then assert that fs.copyFileSync and fs.unlinkSync were
invoked (and not fs.cpSync or fs.rmSync), and assert that createFileSymlinks was
called while createAgentSymlinks was not; reference the migrateSkills function
and the helper functions copyFileSync, unlinkSync, cpSync, rmSync,
createFileSymlinks, createAgentSymlinks when locating where to add these
assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e4e01a3d-f9f6-434e-9ddb-2d9d6e8eb029
📒 Files selected for processing (2)
packages/cli/src/__tests__/commands/migrate.test.tspackages/cli/src/commands/migrate.ts
…, and test coverage - Add silent mode to migrateSkills to prevent duplicate JSON output when called from adopt/setup (fixes critical duplicate output bug) - Change adopt/setup to migrate per-adopted-package instead of all packages - Clean up partial file symlinks on rollback in migrate single-file path - Fix stale source.path for single-file local packages (dirname comparison) - Add test coverage for AGENT/COMMAND single-file migration paths - Add test coverage for setup --canonicalise flag - Fix British English spelling and hardcoded path in plan doc
Addressing all review feedbackAll 8 review findings have been addressed in commits Critical fixes
Major fixes
Test coverage
Trivial
All 2440 tests pass, types and lint clean. |
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (1)
packages/cli/src/__tests__/commands/setup.test.ts (1)
619-712:⚠️ Potential issue | 🟡 MinorAdd a file-based package case to the setup canonicalisation tests.
These cases still only drive
detectedType: 'SKILL', so the newAGENT/COMMANDbranch insetup.tsthat setsentryFile/packageTypeis never exercised throughrunSetup(). A regression there would still pass this suite even though setup now owns file-based adoption as well as the migration hand-off. As per coding guidelines, "If new code paths were added (functions, endpoints, branches) but no corresponding tests exist, flag as SHOULD_FIX."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/cli/src/__tests__/commands/setup.test.ts` around lines 619 - 712, The tests only exercise SKILL-detected files so the new file-based adoption branch in setup.ts (the AGENT/COMMAND branch that sets entryFile and packageType) isn't covered; add a unit test in packages/cli/src/__tests__/commands/setup.test.ts that uses vi.mocked(agentDefs.scanForSkillFiles) to return a scanned file with detectedType: 'AGENT' (or 'COMMAND') and a populated entryFile, then call runSetup('--yes', '--canonicalise') and assert the code path runs by checking migrateModule.migrateSkills was invoked and/or outputModule.outputSuccess contains the canonicalised entry including packageType and entryFile; this will exercise the branch in setup.ts that assigns entryFile/packageType and prevent regressions.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/commands/adopt.ts`:
- Around line 377-385: adoptSkills() is calling migrateSkills() with global:
options.global which is the scan scope, not the write scope, causing migrate to
read the wrong manifest after adoption; change the calls to migrateSkills() to
use the actual scope where each entry was written (e.g., pass global: false for
entries written to the project manifest or true for entries written to the
global manifest) by either (A) tracking scope on each adopted entry (e.g.,
entry.scope or entry.isGlobal) and passing that as the global option to
migrateSkills(entry.name, { yes: true, global: entryScope, dryRun:
options.dryRun, silent: true }), or (B) decoupling the scan flag from migration
and always using the write-target scope (project) when adopt committed to the
project; apply the same fix to the other migrateSkills() calls referenced (lines
~425-435).
In `@packages/cli/src/commands/setup.ts`:
- Around line 424-448: The setupProject function incorrectly uses a single
shared scope variable for both scanning and persisting, causing --global to
still scan project-local files and potentially write project paths into the
global manifest; change the flow so scanning and persistence are done with
explicit scopes per source: keep discovery calls separate for project and global
(e.g., call discoverAgents/discoverSkills twice or add a source flag) or add
per-entry scope metadata when building the skills list, and ensure readManifest
is called with the matching scope for each pass; update any write/persist logic
to use the corresponding scope instead of the shared scope variable so
project-local entries are not added to the global manifest.
In `@plans/2026-04-02-install-cli-locally-v1.md`:
- Line 35: Update the verification checklist so the `agentver --help` output
explicitly includes the new `setup` command; specifically, change the bullet
that reads "`agentver --help` lists all registered commands (adopt, agents,
audit, backup, etc.)" to explicitly enumerate `setup` (e.g., include "setup" in
the list) and confirm the plan text mentions verifying `setup` appears when
running `agentver --help`.
---
Duplicate comments:
In `@packages/cli/src/__tests__/commands/setup.test.ts`:
- Around line 619-712: The tests only exercise SKILL-detected files so the new
file-based adoption branch in setup.ts (the AGENT/COMMAND branch that sets
entryFile and packageType) isn't covered; add a unit test in
packages/cli/src/__tests__/commands/setup.test.ts that uses
vi.mocked(agentDefs.scanForSkillFiles) to return a scanned file with
detectedType: 'AGENT' (or 'COMMAND') and a populated entryFile, then call
runSetup('--yes', '--canonicalise') and assert the code path runs by checking
migrateModule.migrateSkills was invoked and/or outputModule.outputSuccess
contains the canonicalised entry including packageType and entryFile; this will
exercise the branch in setup.ts that assigns entryFile/packageType and prevent
regressions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7780daef-1bb3-42df-9cbf-209b355ce299
📒 Files selected for processing (7)
packages/cli/src/__tests__/commands/adopt.test.tspackages/cli/src/__tests__/commands/migrate.test.tspackages/cli/src/__tests__/commands/setup.test.tspackages/cli/src/commands/adopt.tspackages/cli/src/commands/migrate.tspackages/cli/src/commands/setup.tsplans/2026-04-02-install-cli-locally-v1.md
…lisation adopt always writes to project manifest, so migrateSkills must read from project scope — passing global: false prevents NOT_FOUND on --global --canonicalise. setup now scopes discovery to match the write target: --global only scans global paths, preventing project-local files from leaking into the global manifest.
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/cli/src/commands/adopt.ts`:
- Around line 377-385: The canonicalisation step currently runs
migrateSkills(...) for entries in the adopted array even during dry-run, causing
preview-only adoptions to be processed incorrectly; update both canonicalisation
blocks that check options.canonicalise (the one iterating over adopted and the
later block around 425-435) to first ensure !options.dryRun before calling
migrateSkills, i.e., only call migrateSkills(entry.name, {...}) when
options.canonicalise && !options.dryRun (preserving the existing flags
yes/global/dryRun/silent).
In `@packages/cli/src/commands/setup.ts`:
- Around line 427-430: Update the help text for the --global flag and any
related user-facing messages so they accurately reflect that options.global
toggles the entire setup flow to operate on the global Agentver state only (it
scans and writes the global state and does not leave any project-scoped entries
untouched); locate the flag usage and help strings referenced by the
setupProject function and the strings around where scope is computed (the scope
variable and any messages describing “project detection plus global extras”) and
change wording to explicitly state “scans and writes global Agentver state only”
or similar unambiguous text.
In `@plans/2026-04-02-install-cli-locally-v1.md`:
- Around line 28-35: Make the Step 4 text consistent with the Verification
Criteria by making `agentver --help` mandatory: update Step 4 so it reads that
you must run `agentver --version` and `agentver --help` (not optional) and
confirm `--help` lists all registered commands (including `setup`); ensure the
checklist and the earlier bullet that references `packages/cli/dist/agentver.js`
and `packages/cli/package.json` remain unchanged so the verification criteria
(`agentver --version` outputs 0.3.3 and `agentver --help` lists adopt, agents,
audit, backup, setup, etc.) align with the step.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0df521be-3920-41ac-8589-16d2b53f16ba
📒 Files selected for processing (4)
packages/cli/src/__tests__/commands/adopt.test.tspackages/cli/src/commands/adopt.tspackages/cli/src/commands/setup.tsplans/2026-04-02-install-cli-locally-v1.md
| if (options.canonicalise && adopted.length > 0) { | ||
| for (const entry of adopted) { | ||
| await migrateSkills(entry.name, { | ||
| yes: true, | ||
| global: false, | ||
| dryRun: options.dryRun, | ||
| silent: true, | ||
| }) | ||
| } |
There was a problem hiding this comment.
Do not canonicalise preview-only adoptions.
Because adopted is populated before the write gate, Lines 379 and 429 still call migrateSkills() when options.dryRun is true. Those packages were never written to the manifest, so adopt --dry-run --canonicalise cannot produce a truthful preview and can fail on lookup. Guard both canonicalisation blocks behind !options.dryRun instead.
🩹 Suggested fix
- if (options.canonicalise && adopted.length > 0) {
+ if (!options.dryRun && options.canonicalise && adopted.length > 0) {
for (const entry of adopted) {
await migrateSkills(entry.name, {
yes: true,
global: false,
dryRun: options.dryRun,
silent: true,
})
}
}
...
- if (options.canonicalise && adopted.length > 0) {
+ if (!options.dryRun && options.canonicalise && adopted.length > 0) {
process.stdout.write(chalk.bold('\nCanonicalising adopted skills...\n'))
for (const entry of adopted) {
await migrateSkills(entry.name, {
yes: true,
global: false,
dryRun: options.dryRun,
silent: true,
})
}
}Also applies to: 425-435
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/cli/src/commands/adopt.ts` around lines 377 - 385, The
canonicalisation step currently runs migrateSkills(...) for entries in the
adopted array even during dry-run, causing preview-only adoptions to be
processed incorrectly; update both canonicalisation blocks that check
options.canonicalise (the one iterating over adopted and the later block around
425-435) to first ensure !options.dryRun before calling migrateSkills, i.e.,
only call migrateSkills(entry.name, {...}) when options.canonicalise &&
!options.dryRun (preserving the existing flags yes/global/dryRun/silent).
| async function setupProject(options: SetupOptions): Promise<void> { | ||
| const jsonMode = isJSONMode() | ||
| const projectRoot = process.cwd() | ||
| const scope: Scope = options.global ? 'global' : 'project' |
There was a problem hiding this comment.
Make the --global help text match the actual behaviour.
Line 430 switches the whole setup flow into global scope, but Line 580 still reads like “project detection plus global extras”. Please say explicitly that this flag scans and writes the global Agentver state only, otherwise users will expect project entries to stay in scope.
✏️ Suggested wording
- .option('--global', 'Include global agent paths in detection')
+ .option(
+ '--global',
+ 'Use the global scope only (scan global paths and use the global manifest/lockfile)'
+ )Also applies to: 579-580
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/cli/src/commands/setup.ts` around lines 427 - 430, Update the help
text for the --global flag and any related user-facing messages so they
accurately reflect that options.global toggles the entire setup flow to operate
on the global Agentver state only (it scans and writes the global state and does
not leave any project-scoped entries untouched); locate the flag usage and help
strings referenced by the setupProject function and the strings around where
scope is computed (the scope variable and any messages describing “project
detection plus global extras”) and change wording to explicitly state “scans and
writes global Agentver state only” or similar unambiguous text.
| - [ ] **Step 4: Verify the installation** — Run `agentver --version` and confirm it outputs `0.3.3` (the current version in `packages/cli/package.json:3`). Optionally run `agentver --help` to verify all commands are registered correctly. | ||
|
|
||
| ## Verification Criteria | ||
|
|
||
| - `bun install` completes without errors | ||
| - `packages/cli/dist/agentver.js` exists and starts with `#!/usr/bin/env node` | ||
| - `agentver --version` outputs `0.3.3` | ||
| - `agentver --help` lists all registered commands, including `setup` (adopt, agents, audit, backup, setup, etc.) |
There was a problem hiding this comment.
Align Step 4 with the verification criteria (don’t mark --help as optional).
Line 28 says agentver --help is optional, but Line 35 requires it as a pass condition (including setup). Make this mandatory in Step 4 to avoid ambiguous execution of the plan.
Suggested doc fix
-- [ ] **Step 4: Verify the installation** — Run `agentver --version` and confirm it outputs `0.3.3` (the current version in `packages/cli/package.json:3`). Optionally run `agentver --help` to verify all commands are registered correctly.
+- [ ] **Step 4: Verify the installation** — Run `agentver --version` and confirm it outputs `0.3.3` (the current version in `packages/cli/package.json:3`). Run `agentver --help` and confirm `setup` is listed with the other registered commands.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plans/2026-04-02-install-cli-locally-v1.md` around lines 28 - 35, Make the
Step 4 text consistent with the Verification Criteria by making `agentver
--help` mandatory: update Step 4 so it reads that you must run `agentver
--version` and `agentver --help` (not optional) and confirm `--help` lists all
registered commands (including `setup`); ensure the checklist and the earlier
bullet that references `packages/cli/dist/agentver.js` and
`packages/cli/package.json` remain unchanged so the verification criteria
(`agentver --version` outputs 0.3.3 and `agentver --help` lists adopt, agents,
audit, backup, setup, etc.) align with the step.
Summary by CodeRabbit
New Features
Migration
Tests
Documentation