feat: add Polytoken installer support - #2575
Conversation
📝 WalkthroughWalkthroughAdds Polytoken native-skills installer metadata and end-to-end installation tests. Updates installer prompts with runtime fallbacks for unavailable autocomplete, multiselect, box, and directory APIs. ChangesPolytoken installation
Prompt compatibility fallbacks
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tools/installer/prompts.js`:
- Around line 269-280: Update the fallback multiselect path around
clack.multiselect so locked values cannot be deselected, matching the primary
AutocompletePrompt behavior. Mark locked options with a clear “always installed”
hint and ensure required validation allows submission when only locked values
remain selected. Preserve the existing deduplication and locked-value
re-addition in the returned result.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7728d6ef-22d8-4660-ac70-304a386acdcd
📒 Files selected for processing (3)
test/test-installation-components.jstools/installer/ide/platform-codes.yamltools/installer/prompts.js
…-only Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
| assert(polytokenInstaller?.target_dir === '.agents/skills', 'Polytoken target_dir uses the shared project-local skills path'); | ||
| assert(!polytokenInstaller?.global_target_dir, 'Polytoken does not claim an undocumented global skills path'); |
There was a problem hiding this comment.
PR description contradicts implementation path
The PR description states skills are written to .polytoken/skills, but the implementation (and this assertion) uses .agents/skills. The description also still references "add Clack compatibility fallbacks" even though that work was deliberately dropped in the final commit. The code itself is correct, but the description may confuse future reviewers or users consulting the PR history.
Prompt To Fix With AI
This is a comment left during a code review.
Path: test/test-installation-components.js
Line: 1415-1416
Comment:
**PR description contradicts implementation path**
The PR description states skills are written to `.polytoken/skills`, but the implementation (and this assertion) uses `.agents/skills`. The description also still references "add Clack compatibility fallbacks" even though that work was deliberately dropped in the final commit. The code itself is correct, but the description may confuse future reviewers or users consulting the PR history.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Greptile SummaryThis PR adds Polytoken as a supported installer platform by registering it in
Confidence Score: 4/5Safe to merge — the two changed files are additive, low-risk, and the installer pipeline for Polytoken is fully covered by the new test suite. The YAML entry is minimal and consistent with comparable no-global-dir platforms. The test suite closely mirrors the existing Pi suite and passes all assertions. The only notable issue is a stale PR description that still references Files Needing Attention: No files require special attention; the PR description should be updated to match the implementation before merging if commit-message accuracy matters to the team.
|
| Filename | Overview |
|---|---|
| tools/installer/ide/platform-codes.yaml | Adds the polytoken platform entry with target_dir set to .agents/skills and no global_target_dir — consistent with other no-global platforms (replit, ona, trae); alphabetical ordering is preserved. |
| test/test-installation-components.js | Adds Suite 28b covering Polytoken install/detect/reinstall lifecycle; frontmatter assertions are less thorough than Suite 28 (Pi) — no name-key check and no keys-only-name-and-description guard — though the shared code path means the gap is low risk. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[platform-codes.yaml\npolytoken entry added] --> B[IdeManager.loadHandlers]
B --> C[ConfigDrivenIdeSetup\ninstantiated for 'polytoken']
C --> D{getAvailableIdes}
D -->|preferred=false| E[Listed in other IDEs]
C --> F{detectInstalledIdes}
F --> G[Check .agents/skills\nfor bmad-owned entries]
G -->|found| H[polytoken detected]
G -->|not found| I[polytoken not detected]
C --> J{setup polytoken}
J --> K[Write skills to\n.agents/skills/]
K --> L[SKILL.md with\nname + description frontmatter]
Prompt To Fix All With AI
### Issue 1
test/test-installation-components.js:1415-1416
**PR description contradicts implementation path**
The PR description states skills are written to `.polytoken/skills`, but the implementation (and this assertion) uses `.agents/skills`. The description also still references "add Clack compatibility fallbacks" even though that work was deliberately dropped in the final commit. The code itself is correct, but the description may confuse future reviewers or users consulting the PR history.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "refactor: drop unrelated Clack compatibi..." | Re-trigger Greptile
What
Add Polytoken (https://docs.polytoken.dev), a new coding agent currently in early alpha testing, as a supported installer platform, writing native skills to
.agents/skills.Why
Polytoken users should be able to select the platform during BMAD installation and receive native skill-directory output.
How
Testing
npm run test:install— 402 passed, 0 failednpm run lint— passed