Skip to content

feat: auto-init workspace and conditional agent files#72

Merged
christso merged 4 commits intomainfrom
feat/auto-init-agent-files
Feb 4, 2026
Merged

feat: auto-init workspace and conditional agent files#72
christso merged 4 commits intomainfrom
feat/auto-init-agent-files

Conversation

@christso
Copy link
Copy Markdown
Contributor

@christso christso commented Feb 4, 2026

Summary

  • plugin install --scope project now auto-creates .allagents/workspace.yaml with defaults when missing, removing the need to run workspace init first
  • initWorkspace() and syncWorkspace() skip AGENTS.md/CLAUDE.md creation and WORKSPACE-RULES injection when repositories array is empty or absent
  • Agent files are only created/managed when repositories has entries (multi-repo workspace), making single-project usage cleaner

Test plan

  • Auto-init creates workspace.yaml with correct defaults on addPlugin()
  • initWorkspace() skips agent files when repositories empty/absent
  • initWorkspace() creates agent files when repositories has entries
  • syncWorkspace() skips agent file auto-inclusion and WORKSPACE-RULES when repositories empty
  • syncWorkspace() still syncs skills and commands when repositories empty
  • User-created agent files not deleted when repositories becomes empty
  • All 480 tests pass

🤖 Generated with Claude Code

christso and others added 3 commits February 4, 2026 03:57
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>
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 4, 2026

Deploying allagents with  Cloudflare Pages  Cloudflare Pages

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

View logs

…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>
@christso christso merged commit 99887d6 into main Feb 4, 2026
1 check passed
@christso christso deleted the feat/auto-init-agent-files branch February 4, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant