Skip to content

Commit 237c12b

Browse files
committed
docs: remove self-install references and update architecture docs
Updated to reflect Phase 1-3 changes: - Removed all SelfInstall/self-installation references - Updated CONTRIBUTING.md to use RegisterManagerV2 pattern - Updated architecture.md to remove self-install capabilities - Updated code-map.md to remove deleted tools.go reference - Updated package-management.md to remove bootstrap examples - Updated cli.md to clarify manager prerequisites All docs now correctly state package managers must be pre-installed, with plonk doctor providing instructions.
1 parent 2517773 commit 237c12b

File tree

5 files changed

+25
-47
lines changed

5 files changed

+25
-47
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,12 @@ One of the most impactful contributions is adding support for new package manage
132132

133133
1. **Implement the PackageManager interface** in `internal/resources/packages/`
134134
2. **Add required operations**: Install, Uninstall, ListInstalled, etc.
135-
3. **Implement optional capabilities**: Search, Info, Upgrade, Health, Self-Install (through capability interfaces)
136-
4. **Add health checking**: Implement `CheckHealth()` method
137-
5. **Add self-installation**: Implement `SelfInstall()` method
138-
6. **Add upgrade support**: Implement `Upgrade()` and `Outdated()` methods
139-
7. **Register the manager** in the package manager registry
140-
8. **Add tests** for all functionality
141-
9. **Update documentation** with examples and supported operations
135+
3. **Implement optional capabilities**: Search, Info, Upgrade, Health (through capability interfaces)
136+
4. **Add health checking**: Implement `CheckHealth()` method with installation instructions
137+
5. **Add upgrade support**: Implement `Upgrade()` method if applicable
138+
6. **Register the manager**: Use `RegisterManagerV2` with executor injection pattern
139+
7. **Add tests** for all functionality
140+
8. **Update documentation** with examples and supported operations
142141

143142
See existing implementations like `homebrew.go`, `npm.go`, or `cargo.go` as examples.
144143

docs/architecture.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Resources are organized by type:
6969
- Package specification parsing (`spec.go`)
7070
- Command execution abstraction (`executor.go`)
7171
- Operations for install, uninstall, search, info, upgrade
72-
- Health checking and self-installation capabilities
72+
- Health checking capabilities
7373
- Outdated package detection
7474

7575
Supported package managers:
@@ -123,7 +123,6 @@ The lock file uses a versioned format for future compatibility.
123123

124124
- Clone command implementation
125125
- Git repository cloning
126-
- Automatic package manager installation via SelfInstall()
127126
- Dependency-aware installation that resolves package manager dependencies and installs in correct order
128127
- Tool installation
129128

@@ -151,12 +150,13 @@ Plonk works without any configuration files by using sensible defaults:
151150
Each package manager implements a common interface following the Interface Segregation Principle (ISP). This allows:
152151
- Consistent behavior across different tools
153152
- Easy addition of new package managers
154-
- Optional capability detection via type assertions (search, info, upgrade, health checks, self-install)
153+
- Optional capability detection via type assertions (search, info, upgrade, health checks)
155154
- Managers implement only the capabilities they support
156155
- Self-health checking and diagnostics
157-
- Automatic self-installation during environment setup
158156
- Package upgrade management
159157

158+
**Note**: Package managers must be installed manually or via other supported package managers before use. The `plonk doctor` command provides installation instructions for missing managers. All managers are registered using `RegisterManagerV2` with executor injection for testability.
159+
160160
See [Capability Usage Examples](#capability-usage-examples) for implementation patterns.
161161

162162
### 3. State-Based Management
@@ -231,10 +231,10 @@ All commands support multiple output formats (table, JSON, YAML) to support:
231231

232232
1. Implement the `PackageManager` interface in `internal/resources/packages/`
233233
2. Implement required operations (Install, Uninstall, ListInstalled, etc.)
234-
3. Implement optional capabilities through interfaces (search, info, upgrade, health, self-install)
234+
3. Implement optional capabilities through interfaces (search, info, upgrade, health)
235235
4. Implement health checking via CheckHealth() method
236-
5. Implement self-installation via SelfInstall() method
237-
6. Implement package upgrade capabilities via Upgrade() and Outdated() methods
236+
5. Implement package upgrade capabilities via Upgrade() and Outdated() methods
237+
6. Register using `RegisterManagerV2` with executor injection
238238

239239
### Adding a New Resource Type
240240

@@ -282,9 +282,8 @@ Plonk uses structured error handling:
282282
- No elevated privileges required for user packages
283283
- Atomic file operations prevent corruption
284284
- Backup files created before modifications
285-
- Package manager self-installation may execute remote scripts (opt-in via SelfInstall capability)
286285
- Git operations use standard git binary
287-
- Users should review package manager installation scripts before using automatic installation
286+
- Package managers must be installed separately before use
288287
289288
## Future Considerations
290289
@@ -321,11 +320,6 @@ if upgrader, ok := mgr.(packages.PackageUpgrader); ok {
321320
if hc, ok := mgr.(packages.PackageHealthChecker); ok {
322321
_, _ = hc.CheckHealth(ctx)
323322
}
324-
325-
// Self-install (PackageSelfInstaller)
326-
if si, ok := mgr.(packages.PackageSelfInstaller); ok {
327-
_ = si.SelfInstall(ctx)
328-
}
329323
```
330324
331325
Helper predicates:
@@ -334,7 +328,6 @@ if packages.SupportsInfo(mgr) { /* safe to assert PackageInfoProvider */ }
334328
if packages.SupportsSearch(mgr) { /* safe to assert PackageSearcher */ }
335329
if packages.SupportsUpgrade(mgr) { /* safe to assert PackageUpgrader */ }
336330
if packages.SupportsHealthCheck(mgr) { /* safe to assert PackageHealthChecker */ }
337-
if packages.SupportsSelfInstall(mgr) { /* safe to assert PackageSelfInstaller */ }
338331
```
339332
340333
These examples demonstrate the intent of the capability model: managers may omit optional features; callers should not assume availability without checking.

docs/cli.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,25 +36,21 @@ Options:
3636

3737
### plonk install
3838

39-
Install packages and add them to management. Supports automatic package manager bootstrapping.
39+
Install packages and add them to management.
4040

4141
```bash
42-
# Bootstrap package managers (automatic detection)
43-
plonk install pnpm cargo uv pipx # Self-installs the managers themselves
44-
4542
# Install packages with default manager
46-
plonk install ripgrep fd bat # Default manager
43+
plonk install ripgrep fd bat
4744

4845
# Install packages with specific managers
4946
plonk install brew:wget npm:prettier pnpm:typescript conda:numpy uv:ruff pixi:tree
5047

51-
# Mixed operations
52-
plonk install pnpm ripgrep npm:prettier # Bootstrap pnpm, install ripgrep via default, install prettier via npm
53-
5448
# Preview changes
55-
plonk install --dry-run pnpm ripgrep # Preview what would be installed
49+
plonk install --dry-run ripgrep
5650
```
5751

52+
**Note**: Package managers must be available before installing packages. Use `plonk doctor` to check for missing managers.
53+
5854
### plonk uninstall
5955

6056
Uninstall packages and remove from management.

docs/cmds/package-management.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Without prefix, uses `default_manager` from configuration (default: brew).
2828

2929
## Install Command
3030

31-
Installs packages and adds them to plonk management. Also supports automatic package manager bootstrapping.
31+
Installs packages and adds them to plonk management.
3232

3333
### Synopsis
3434

@@ -42,11 +42,9 @@ plonk install [options] <package>...
4242

4343
### Behavior
4444

45-
**Package Manager Self-Installation:**
46-
- **Bare manager names** (e.g., `pnpm`, `cargo`) → triggers manager self-installation
47-
- **Prefixed names** (e.g., `brew:npm`) → installs package normally via specified manager
48-
49-
**Regular Package Installation:**
45+
**Package Installation:**
46+
- Package managers must be available before installing packages
47+
- Use `plonk doctor` to check for missing package managers and view installation instructions
5048
- **Not installed** → installs package, adds to plonk.lock
5149
- **Already installed** → adds to plonk.lock (success)
5250
- **Already managed** → skips (no reinstall)
@@ -57,20 +55,14 @@ plonk install [options] <package>...
5755
### Examples
5856

5957
```bash
60-
# Bootstrap package managers (automatic detection)
61-
plonk install pnpm cargo uv pipx
62-
6358
# Install packages with default manager
6459
plonk install ripgrep fd bat
6560

6661
# Install packages with specific managers
6762
plonk install brew:wget npm:prettier pnpm:typescript cargo:exa pipx:black conda:numpy uv:ruff pixi:tree
6863

69-
# Mixed operations (manager bootstrap + package install)
70-
plonk install pnpm ripgrep npm:prettier
71-
7264
# Preview installation
73-
plonk install --dry-run pnpm ripgrep
65+
plonk install --dry-run ripgrep
7466
```
7567

7668
---

docs/code-map.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ This document provides a comprehensive map of the plonk codebase to aid in imple
106106
### Clone Utilities (`internal/clone/`)
107107
- `setup.go` - Clone command implementation and package manager detection
108108
- `git.go` - Git operations for cloning
109-
- `tools.go` - Automated package manager installation via SelfInstall interface
110109

111110
### Diagnostics (`internal/diagnostics/`)
112111
- `health.go` - System health check implementations
@@ -141,8 +140,7 @@ This document provides a comprehensive map of the plonk codebase to aid in imple
141140
- Logic: `internal/clone/setup.go`
142141
- Dependency resolution: `internal/resources/packages/dependencies.go`
143142
- Git operations: `internal/clone/git.go`
144-
- Tool installation: `internal/clone/tools.go`
145-
- Uses: `internal/diagnostics/health.go` for health checks; package manager installation handled via `SelfInstall()` during clone
143+
- Uses: `internal/diagnostics/health.go` for health checks; package managers must be pre-installed, `plonk doctor` provides installation instructions
146144

147145
### apply command
148146
- Entry: `internal/commands/apply.go`

0 commit comments

Comments
 (0)