Skip to content

feat(cli)!: Default commands to global scope - #156

Merged
gricha merged 3 commits into
mainfrom
feat/default-global-scope
Aug 11, 2026
Merged

feat(cli)!: Default commands to global scope#156
gricha merged 3 commits into
mainfrom
feat/default-global-scope

Conversation

@gricha

@gricha gricha commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Make unqualified scope-aware commands operate on global state, with --project selecting repository-local state.
  • Preserve --global and legacy --user aliases, while rejecting project/global conflicts before command execution.
  • Centralize scope resolution, generate explicit-project hooks, and safely diagnose and repair legacy managed hooks.
  • Update the changelog, release guidance, public docs, and Skillet-generated dotagents/QA skills for the v3 migration.

Migration and release

Repository workflows must add --project to every scope-aware command. Existing files are not copied, merged, or removed automatically. Legacy hooks can be updated with dotagents --project doctor --fix.

Package manifests intentionally remain at 2.2.0; Craft must publish this change with a major release. If rollback is necessary, restore the v2 npm release to the latest dist-tag.

Validation

  • pnpm check (291 library tests, 830 CLI tests)
  • pnpm qa:example
  • packed-package verification for both workspace packages
  • non-root Docker QA for global/project isolation, aliases and conflicts, non-Git project init, help output, and legacy hook repair
  • Skillet hosted status/validation, dry evals, and focused changed-scenario evals for both bundled skills

Review focus

Please focus on the centralized scope boundary in cli/main.ts and cli/context.ts, plus managed post-merge hook replacement and migration behavior.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dotagents Ready Ready Preview Aug 11, 2026 4:57pm

Request Review

@gricha
gricha marked this pull request as ready for review August 11, 2026 16:09
@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 11, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e028f45. Configure here.

Comment thread packages/dotagents/src/cli/commands/init.ts
Comment thread packages/dotagents/src/cli/post-merge-hook.ts
Comment thread packages/dotagents/src/cli/commands/init.ts Outdated
Comment thread packages/dotagents/src/cli/post-merge-hook.ts
Comment on lines +292 to 298
values["agents"] === undefined
) {
return;
}
}

// Interactive mode: TTY with no --agents flag

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Interactive init double-calls runInit with empty agents array

After a user completes interactive init, the outer function now falls through and calls runInit with an empty agents array, which can overwrite the agents and trust settings they just selected.

Evidence
  • runInteractiveInit already calls runInit internally with the interactively-chosen agents and trust values.
  • The old code guarded the outer runInit call with an else branch, so it only ran in non-interactive mode.
  • The new code removed the else, so the outer runInit({ agents: [] }) executes unconditionally after runInteractiveInit returns.
  • Because no trust value is passed in the outer call, the second invocation can also overwrite the trust configuration established during the interactive prompts.

Identified by Warden · code-review · FNX-RDC

@gricha
gricha merged commit a9b18c3 into main Aug 11, 2026
19 checks passed
@gricha
gricha deleted the feat/default-global-scope branch August 11, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant