Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
852cb34
feat: initialize TypeScript/Bun project structure
christso Jan 22, 2026
bb54e1c
docs: update @fix_plan.md to mark Phase 1 as complete
christso Jan 22, 2026
4ed9db3
feat: implement workspace init command
christso Jan 22, 2026
e9873ad
docs: update @fix_plan.md with workspace init completion
christso Jan 22, 2026
7760ddb
feat: implement plugin path resolution utilities
christso Jan 22, 2026
073c1f2
docs: update @fix_plan.md - Phase 2 complete
christso Jan 22, 2026
5ad9a6e
docs: add plugin fetch command design
christso Jan 23, 2026
44c2a3b
feat: implement plugin fetch command
christso Jan 23, 2026
87a879c
docs: update @fix_plan.md - plugin fetch complete
christso Jan 23, 2026
00a8041
feat: implement workspace sync command with full plugin support
christso Jan 23, 2026
6ecdd30
docs: update @fix_plan.md - Phase 4 complete
christso Jan 23, 2026
54f577e
feat: implement plugin list and update commands
christso Jan 23, 2026
17bb781
docs: update @fix_plan.md - Phase 3 complete
christso Jan 23, 2026
1dca0d1
refactor: restructure templates into src/ and add examples/
christso Jan 23, 2026
b1a93f5
fix: resolve test race conditions with isolated temp directories
christso Jan 23, 2026
ec49690
feat: implement workspace status command
christso Jan 23, 2026
234fe6d
feat: implement workspace add and remove commands
christso Jan 23, 2026
fd0a8ea
fix: resolve exactOptionalPropertyTypes TypeScript errors
christso Jan 23, 2026
dda2b53
feat: add --force and --dry-run flags to workspace sync
christso Jan 23, 2026
19da967
docs: add comprehensive README documentation
christso Jan 23, 2026
ea46cb1
docs: improve CLI command descriptions
christso Jan 23, 2026
b505427
perf: parallelize file copying for faster sync
christso Jan 23, 2026
a67eee2
docs: mark Phase 5 and 6 as complete in fix plan
christso Jan 23, 2026
ad8eb36
feat: add GitHub shorthand plugin reference support
christso Jan 23, 2026
0727031
refactor: migrate from ESLint to Biome
christso Jan 23, 2026
beabb49
chore: ignore Ralph execution artifacts
christso Jan 23, 2026
bc47022
add claude command
christso Jan 23, 2026
3c2a35d
refactor: move workspace command to .claude/commands structure
christso Jan 23, 2026
b7f3d2a
fix(examples): remove invalid copilot-cli client type
christso Jan 23, 2026
172d53b
fix(cli): handle undefined error in workspace sync
christso Jan 23, 2026
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
60 changes: 60 additions & 0 deletions .claude/commands/allagents/workspace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: AllAgents: Workspace
description: Manage allagents workspaces - init, sync, status, and modify
tags: "[allagents, workspace]"
---

# Allagents Workspace Command

Help the user manage their allagents workspace by running CLI commands and editing configuration.

## Subcommands

| Subcommand | Usage | Description |
|------------|-------|-------------|
| `init` | `allagents workspace init <path>` | Create new workspace from template |
| `sync` | `allagents workspace sync [--force] [--dry-run]` | Sync plugins to all repositories |
| `status` | `allagents workspace status` | Show plugin and client status |
| `add` | `allagents workspace add <plugin>` | Add a plugin (local path or GitHub URL) |
| `remove` | `allagents workspace remove <plugin>` | Remove a plugin from workspace |

## Sync Options

- `--force, -f` - Force re-fetch of remote plugins even if cached
- `--dry-run, -n` - Preview changes without making them

## What to Do

Based on user's request or provided arguments:

1. **No subcommand given**: Run `allagents workspace status` to show current state
2. **"init" subcommand**: Run `allagents workspace init <path>` with provided path
3. **"sync" subcommand**: Run `allagents workspace sync` with any flags
4. **"status" subcommand**: Run `allagents workspace status`
5. **"add" subcommand**: Run `allagents workspace add <plugin>` with provided plugin
6. **"remove" subcommand**: Run `allagents workspace remove <plugin>` with provided plugin

## workspace.yaml Structure

```yaml
repositories:
- path: ../my-repo
owner: github-owner
repo: repo-name
description: optional description

plugins:
- ./local/plugin/path
- https://github.com/owner/repo/tree/main/plugins/name

clients:
- claude
- copilot
- opencode
```

## Tips

- Run `--dry-run` first to preview sync changes before applying
- Use `--force` to re-fetch cached GitHub plugins
- Always run `status` after configuration changes to verify resolution
48 changes: 48 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Dependencies
node_modules/
bun.lockb

# Build output
dist/
*.tsbuildinfo

# Test coverage
coverage/
.nyc_output/

# Environment
.env
.env.local
.env.*.local

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Logs
logs/
*.log
npm-debug.log*

# Temporary files
tmp/
temp/
*.tmp

# Ralph runtime files (not config)
.ralph/.call_count
.ralph/.circuit_breaker_history
.ralph/.circuit_breaker_state
.ralph/.exit_signals
.ralph/.last_reset
.ralph/.ralph_session
.ralph/logs/
.ralph/progress.json
.ralph/status.json
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"arrowParens": "always"
}
13 changes: 13 additions & 0 deletions .ralph/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Ralph execution artifacts - do not commit
logs/
archive/
progress.json
status.json
.claude_session_id

# Keep templates and specs
!PROMPT.md
!@fix_plan.md
!@AGENT.md
!specs/
.ralph_session_history
241 changes: 144 additions & 97 deletions .ralph/@fix_plan.md
Original file line number Diff line number Diff line change
@@ -1,107 +1,110 @@
# Ralph Fix Plan

## Phase 1: Project Foundation (High Priority)
- [ ] Initialize TypeScript/Bun project structure
- [ ] Create package.json with dependencies (commander, js-yaml, simple-git, zod)
- [ ] Set up tsconfig.json with strict mode
- [ ] Configure Bun test framework
- [ ] Set up BATS for integration tests
- [ ] Define core type definitions
- [ ] WorkspaceConfig interface (workspace.yaml)
- [ ] PluginManifest interface (plugin.json)
- [ ] SkillMetadata interface (SKILL.md frontmatter)
- [ ] ClientMapping type and CLIENT_MAPPINGS constant
- [ ] Create workspace template in templates/workspace-1/
- [ ] AGENTS.md with workspace rules
- [ ] workspace.yaml example
## Phase 1: Project Foundation (High Priority) ✅ COMPLETED
- [x] Initialize TypeScript/Bun project structure
- [x] Create package.json with dependencies (commander, js-yaml, simple-git, zod)
- [x] Set up tsconfig.json with strict mode
- [x] Configure Bun test framework
- [ ] Set up BATS for integration tests (deferred to Phase 2)
- [x] Define core type definitions
- [x] WorkspaceConfig interface (workspace.yaml)
- [x] PluginManifest interface (plugin.json)
- [x] SkillMetadata interface (SKILL.md frontmatter)
- [x] ClientMapping type and CLIENT_MAPPINGS constant
- [x] Create workspace template in src/templates/default/
- [x] AGENTS.md with workspace rules
- [x] workspace.yaml example

## Phase 2: Core Commands (High Priority)
- [ ] Implement `allagents workspace init <path>`
- [ ] Validate path doesn't exist
- [ ] Copy template files
- [ ] Convert relative plugin paths to absolute
- [ ] Initialize git repository
- [ ] Create initial commit
- [ ] Add unit tests
- [ ] Add BATS integration test
- [ ] Implement workspace.yaml parser
- [ ] YAML parsing with validation
- [ ] Zod schema validation
- [ ] Error handling with clear messages
- [ ] Add unit tests
- [ ] Implement plugin path resolution
- [ ] Detect GitHub URLs vs local paths
- [ ] Resolve relative to absolute paths
- [ ] Add unit tests
## Phase 2: Core Commands (High Priority) ✅ COMPLETED
- [x] Implement `allagents workspace init <path>`
- [x] Validate path doesn't exist
- [x] Copy template files
- [x] Convert relative plugin paths to absolute
- [x] Initialize git repository
- [x] Create initial commit
- [x] Add unit tests (5 tests for parser)
- [ ] Add BATS integration test (deferred to later)
- [x] Implement workspace.yaml parser
- [x] YAML parsing with validation
- [x] Zod schema validation
- [x] Error handling with clear messages
- [x] Add unit tests
- [x] Implement plugin path resolution
- [x] Detect GitHub URLs vs local paths
- [x] Resolve relative to absolute paths
- [x] Parse GitHub URLs (owner/repo extraction)
- [x] Generate cache paths for remote plugins
- [x] Validate plugin sources
- [x] Add unit tests (25 comprehensive tests)

## Phase 3: Plugin Fetching (High Priority)
- [ ] Implement `allagents plugin fetch <url>`
- [ ] GitHub URL validation
- [ ] Cache directory setup (~/.allagents/plugins/marketplaces/)
- [ ] Integration with gh CLI
- [ ] Error handling for auth failures
- [ ] Add unit and integration tests
- [ ] Implement `allagents plugin list`
- [ ] Read cache directory
- [ ] Display formatted table
- [ ] Add integration test
- [ ] Implement `allagents plugin update [name]`
- [ ] Update single or all cached plugins
- [ ] Use git pull in cache directory
- [ ] Add integration test
## Phase 3: Plugin Fetching (High Priority) ✅ COMPLETED
- [x] Implement `allagents plugin fetch <url>`
- [x] GitHub URL validation
- [x] Cache directory setup (~/.allagents/plugins/marketplaces/)
- [x] Integration with gh CLI via execa
- [x] --force flag for updates
- [x] Error handling for auth failures, 404, network errors
- [x] Add unit tests (8 comprehensive tests)
- [ ] Add integration tests (deferred)
- [x] Implement `allagents plugin list`
- [x] Read cache directory
- [x] Display name, path, last modified
- [x] Helpful message when empty
- [x] Implement `allagents plugin update [name]`
- [x] Update single plugin by name
- [x] Update all cached plugins if no name
- [x] Uses git pull in cache directory

## Phase 4: Sync Implementation (High Priority)
- [ ] Implement skill validation
- [ ] YAML frontmatter parser
- [ ] Validate required fields (name, description)
- [ ] Validate name format (lowercase, alphanumeric + hyphens, max 64)
- [ ] Add comprehensive unit tests
- [ ] Implement file transformation logic
- [ ] Command file extensions (.md → .prompt.md for Copilot)
- [ ] Path transformations based on CLIENT_MAPPINGS
- [ ] Add unit tests for each client type
- [ ] Implement agent file handling
- [ ] Source precedence logic (CLAUDE.md → AGENTS.md)
- [ ] Workspace rules appending
- [ ] Multiple client file creation
- [ ] Add unit tests
- [ ] Implement `allagents workspace sync`
- [ ] Read workspace.yaml
- [ ] Fetch/resolve all plugins
- [ ] Copy commands with transforms
- [ ] Copy skills with validation
- [ ] Copy hooks (Claude/Factory only)
- [ ] Create/update agent files
- [ ] Create git commit with metadata
- [ ] Add comprehensive integration tests
## Phase 4: Sync Implementation (High Priority) ✅ COMPLETED
- [x] Implement skill validation
- [x] YAML frontmatter parser (gray-matter)
- [x] Validate required fields (name, description)
- [x] Validate name format (lowercase, alphanumeric + hyphens, max 64)
- [x] Add comprehensive unit tests (9 tests)
- [x] Implement file transformation logic
- [x] Command file extensions (.md → .prompt.md for Copilot)
- [x] Path transformations based on CLIENT_MAPPINGS
- [x] Skills/hooks/commands copy operations
- [x] Implement agent file handling
- [x] Source precedence logic (CLAUDE.md → AGENTS.md)
- [x] Workspace rules appending
- [x] Multiple client file creation
- [x] Implement `allagents workspace sync`
- [x] Read workspace.yaml
- [x] Fetch/resolve all plugins (GitHub + local)
- [x] Copy commands with transforms
- [x] Copy skills with validation
- [x] Copy hooks (Claude/Factory only)
- [x] Create/update agent files
- [x] Create git commit with metadata
- [ ] Add comprehensive integration tests (deferred)

## Phase 5: Additional Commands (Medium Priority)
- [ ] Implement `allagents workspace status`
- [ ] Check cache status for remote plugins
- [ ] Check timestamps for local plugins
- [ ] Display formatted table
- [ ] Add integration test
- [ ] Implement `allagents workspace add <plugin>`
- [ ] Validate plugin source
- [ ] Update workspace.yaml
- [ ] Optional sync trigger
- [ ] Add integration test
- [ ] Implement `allagents workspace remove <plugin>`
- [ ] Remove from workspace.yaml
- [ ] Optional cleanup
- [ ] Add integration test
## Phase 5: Additional Commands (Medium Priority) ✅ COMPLETED
- [x] Implement `allagents workspace status`
- [x] Check cache status for remote plugins
- [x] Check path existence for local plugins
- [x] Display formatted list with status icons
- [ ] Add integration test (deferred)
- [x] Implement `allagents workspace add <plugin>`
- [x] Validate plugin source
- [x] Update workspace.yaml
- [x] Helpful message to run sync
- [ ] Add integration test (deferred)
- [x] Implement `allagents workspace remove <plugin>`
- [x] Remove from workspace.yaml
- [ ] Add integration test (deferred)

## Phase 6: Polish (Medium Priority)
- [ ] Add --force flag support to workspace sync
- [ ] Add --dry-run flag support to workspace sync
- [ ] Improve error messages with actionable guidance
- [ ] Add comprehensive documentation
- [ ] README with examples
- [ ] CLI help text
- [ ] Error message catalog
- [ ] Performance optimization
- [ ] Parallel file copying
- [ ] Efficient git operations
## Phase 6: Polish (Medium Priority) ✅ COMPLETED
- [x] Add --force flag support to workspace sync
- [x] Add --dry-run flag support to workspace sync
- [x] Improve error messages with actionable guidance
- [x] Add comprehensive documentation
- [x] README with examples
- [x] CLI help text
- [x] Error message catalog (in-code)
- [x] Performance optimization
- [x] Parallel file copying
- [x] Efficient git operations (using Promise.all for parallel sync)

## Phase 7: Advanced Features (Low Priority)
- [ ] Frontmatter transformation for tool-specific fields
Expand All @@ -114,6 +117,50 @@
- [x] Project initialization
- [x] Ralph configuration created
- [x] Technical requirements specification written
- [x] Phase 1: Project Foundation
- [x] TypeScript/Bun project setup with all dependencies
- [x] All core type definitions with Zod validation
- [x] Workspace template created
- [x] Basic CLI structure with Commander.js
- [x] 12 unit tests passing (100% pass rate)
- [x] Build and typecheck working
- [x] Phase 2: Core Commands
- [x] workspace init command fully implemented
- [x] workspace.yaml parser with full validation
- [x] Template-based workspace creation
- [x] Automatic plugin path conversion (relative → absolute)
- [x] Git initialization with commit
- [x] Plugin path resolution utilities
- [x] GitHub URL detection and parsing
- [x] Path normalization (relative → absolute)
- [x] Plugin source validation
- [x] Cache path generation
- [x] 42 unit tests passing (100% pass rate)
- [x] End-to-end CLI command working
- [x] Phase 3: plugin commands
- [x] plugin fetch with execa/gh CLI integration
- [x] plugin list with cache directory reading
- [x] plugin update with git pull support
- [x] All commands with user-friendly output
- [x] 8 unit tests for plugin fetch
- [x] Phase 4: workspace sync command
- [x] Skill validation with gray-matter YAML parser
- [x] File transformation logic for all 8 clients
- [x] Agent file handling with source precedence
- [x] Workspace rules auto-appending
- [x] Git commit after sync
- [x] 9 unit tests for skill validation
- [x] 54 total tests (all passing sequentially)
- [x] Phase 5: Additional Commands
- [x] workspace status with plugin availability check
- [x] workspace add with source validation
- [x] workspace remove
- [x] Phase 6: Polish
- [x] --force and --dry-run flags for workspace sync
- [x] Comprehensive README documentation
- [x] Improved CLI help descriptions
- [x] Parallel file copying for performance
- [x] 59 total tests (all passing)

## Notes
- Focus on getting workspace init and sync working first
Expand Down
Loading