feat: auto-init workspace and conditional agent files#72
Merged
Conversation
Instead of returning an error when .allagents/workspace.yaml doesn't exist, addPlugin() now auto-creates it with default config (empty repositories, empty plugins, default clients list), matching the behavior of addUserPlugin() for user scope. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…empty When repositories array is empty or absent in workspace.yaml, initWorkspace() now skips creating AGENTS.md, CLAUDE.md, and injecting WORKSPACE-RULES. This avoids generating rules that reference repository paths when none are configured (e.g., plugin-only workspaces created via addPlugin auto-init). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… empty When workspace.yaml has no repositories configured, syncWorkspace() now skips agent file auto-inclusion, WORKSPACE-RULES injection, and the CLAUDE.md fallback copy. Skills and commands continue to sync regardless. This matches the pattern established in initWorkspace() (Task 2). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Deploying allagents with
|
| Latest commit: |
bad5892
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://16fb9ebd.allagents.pages.dev |
| Branch Preview URL: | https://feat-auto-init-agent-files.allagents.pages.dev |
…kspace.source When a workspace has repositories configured but no workspace: section in workspace.yaml, syncWorkspace() now directly creates/updates agent files with WORKSPACE-RULES. Previously, agent file handling was entirely gated on config.workspace being present, so workspaces without a source template never got AGENTS.md or CLAUDE.md. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
plugin install --scope projectnow auto-creates.allagents/workspace.yamlwith defaults when missing, removing the need to runworkspace initfirstinitWorkspace()andsyncWorkspace()skip AGENTS.md/CLAUDE.md creation and WORKSPACE-RULES injection whenrepositoriesarray is empty or absentrepositorieshas entries (multi-repo workspace), making single-project usage cleanerTest plan
addPlugin()initWorkspace()skips agent files when repositories empty/absentinitWorkspace()creates agent files when repositories has entriessyncWorkspace()skips agent file auto-inclusion and WORKSPACE-RULES when repositories emptysyncWorkspace()still syncs skills and commands when repositories empty🤖 Generated with Claude Code