feat: auto-detect installed harnesses from project artifacts#21
Merged
Conversation
3dbbbad to
79289f1
Compare
Instead of defaulting to ["universal"], the configure and install commands now detect which harnesses are already present in the project by checking for characteristic top-level artifacts: - Universal: AGENTS.md - Claude Code: .claude/ - Cursor: .cursor/ - GitHub Copilot: .github/agents/ or .vscode/mcp.json - Windsurf: .windsurf/ or .windsurfrules - Cline: .clinerules or cline_mcp_settings.json - Roo Code: .roo/ or .roomodes or .roorules - Kiro: .kiro/ - OpenCode: opencode.json or .opencode/ Each HarnessWriter now implements a detect(projectRoot) method. detectHarnesses() in index.ts runs all detectors in parallel. In configure, detected harnesses are pre-selected as initial values (still overridable by saved lock file harnesses). In install, detected harnesses are used as the fallback when no --harness flag or lock file harnesses field is present, with "universal" as the last resort if nothing is detected. https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH feat: mark harness detection as verified or unverified Adds detectionVerified: boolean to HarnessWriter. Verified harnesses (universal, copilot, kiro, opencode) have had their detect() criteria confirmed against real-world artifacts. Unverified ones (claude-code, cursor, windsurf, cline, roo-code) use inferred heuristics and need feedback from users of those tools. The configure wizard appends "· auto-detect unverified" to the hint for unverified harnesses so users can see at a glance which detections are confirmed and which may need adjustment. https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH refactor: rename detectionVerified→verified, reorder harnesses, update hint - Rename detectionVerified → verified on HarnessWriter: the flag covers the whole harness (install + detect), not just detection - Wizard hint for unverified harnesses now reads "· unverified — config generation may be inaccurate" - allHarnessWriters reordered so verified harnesses (universal, copilot, kiro, opencode) appear first, unverified ones (claude-code, cursor, windsurf, cline, roo-code) appear after https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH style: format install.ts https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH fix: move pathExists above clack/core imports in util.ts fix: update HarnessWriterSchema to include verified and detect fix: update harness ID order in index.spec.ts
harnesses was never written to the lock file (setup omits it, configure is ephemeral), so lockFile.harnesses was always undefined. Remove the field from LockFile and UserConfig types, simplify configure to always use detectHarnesses(), and simplify install to resolve via --harness flag or auto-detection only. Tests updated accordingly: lock-file-harnesses test replaced with auto-detection test, detectHarnesses mock added to both suites. https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH refactor: remove harness handling from ade install ade install now only handles skills and knowledge sources. Harness installation belongs exclusively to ade configure. - runInstall() signature simplified (no harnessIds or harnessWriters params) - --harness flag removed from CLI - detectHarnesses, getHarnessIds, getHarnessWriter removed from install - index.ts install branch simplified to a single line - install.spec.ts stripped of all harness-related tests and mocks https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH fix: update specs for removed harness args and new HarnessWriter fields fix: add verified/detect to mock HarnessWriter in index.spec.ts
79289f1 to
893d60f
Compare
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.
Instead of defaulting to ["universal"], the configure and install
commands now detect which harnesses are already present in the project
by checking for characteristic top-level artifacts:
Each HarnessWriter now implements a detect(projectRoot) method.
detectHarnesses() in index.ts runs all detectors in parallel.
In configure, detected harnesses are pre-selected as initial values
(still overridable by saved lock file harnesses). In install, detected
harnesses are used as the fallback when no --harness flag or lock file
harnesses field is present, with "universal" as the last resort if
nothing is detected.
https://claude.ai/code/session_01GZ3o2r8bg3ry68sJvuh5pH