@every-env/compound-plugin 0.12.0 → 2.34.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.github/workflows/publish.yml +20 -10
  3. package/.releaserc.json +36 -0
  4. package/AGENTS.md +1 -0
  5. package/CHANGELOG.md +39 -0
  6. package/CLAUDE.md +14 -0
  7. package/README.md +35 -2
  8. package/bun.lock +977 -0
  9. package/docs/plans/2026-03-01-fix-setup-skill-non-claude-llm-fallback-plan.md +140 -0
  10. package/docs/plans/2026-03-03-feat-sync-claude-mcp-all-supported-providers-plan.md +639 -0
  11. package/docs/solutions/adding-converter-target-providers.md +2 -1
  12. package/docs/solutions/plugin-versioning-requirements.md +4 -0
  13. package/package.json +10 -4
  14. package/plugins/compound-engineering/.claude-plugin/plugin.json +1 -1
  15. package/plugins/compound-engineering/CHANGELOG.md +10 -0
  16. package/plugins/compound-engineering/CLAUDE.md +5 -0
  17. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md +6 -0
  18. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md +6 -0
  19. package/plugins/compound-engineering/skills/setup/SKILL.md +6 -0
  20. package/src/commands/sync.ts +21 -60
  21. package/src/index.ts +2 -1
  22. package/src/parsers/claude-home.ts +55 -3
  23. package/src/sync/codex.ts +38 -62
  24. package/src/sync/commands.ts +198 -0
  25. package/src/sync/copilot.ts +14 -36
  26. package/src/sync/droid.ts +50 -9
  27. package/src/sync/gemini.ts +87 -28
  28. package/src/sync/json-config.ts +47 -0
  29. package/src/sync/kiro.ts +49 -0
  30. package/src/sync/mcp-transports.ts +19 -0
  31. package/src/sync/openclaw.ts +18 -0
  32. package/src/sync/opencode.ts +10 -30
  33. package/src/sync/pi.ts +12 -36
  34. package/src/sync/qwen.ts +66 -0
  35. package/src/sync/registry.ts +141 -0
  36. package/src/sync/skills.ts +21 -0
  37. package/src/sync/windsurf.ts +59 -0
  38. package/src/types/kiro.ts +3 -1
  39. package/src/types/qwen.ts +3 -0
  40. package/src/types/windsurf.ts +1 -0
  41. package/src/utils/codex-agents.ts +1 -1
  42. package/src/utils/detect-tools.ts +4 -13
  43. package/src/utils/files.ts +7 -0
  44. package/src/utils/symlink.ts +4 -6
  45. package/tests/claude-home.test.ts +46 -0
  46. package/tests/cli.test.ts +102 -0
  47. package/tests/detect-tools.test.ts +30 -7
  48. package/tests/sync-codex.test.ts +64 -0
  49. package/tests/sync-copilot.test.ts +60 -4
  50. package/tests/sync-droid.test.ts +44 -4
  51. package/tests/sync-gemini.test.ts +54 -0
  52. package/tests/sync-kiro.test.ts +83 -0
  53. package/tests/sync-openclaw.test.ts +51 -0
  54. package/tests/sync-qwen.test.ts +75 -0
  55. package/tests/sync-windsurf.test.ts +89 -0
@@ -0,0 +1,140 @@
1
+ ---
2
+ title: "fix: Setup skill fails silently on non-Claude LLMs due to AskUserQuestion dependency"
3
+ type: fix
4
+ status: active
5
+ date: 2026-03-01
6
+ ---
7
+
8
+ ## Enhancement Summary
9
+
10
+ **Deepened on:** 2026-03-01
11
+ **Research agents used:** best-practices-researcher, architecture-strategist, code-simplicity-reviewer, scope-explorer
12
+
13
+ ### Key Improvements
14
+ 1. Simplified preamble from 16 lines to 4 lines — drop platform name list and example blockquote (YAGNI)
15
+ 2. Expanded scope: `create-new-skill.md` also has `AskUserQuestion` and needs the same fix
16
+ 3. Clarified that `codex-agents.ts` change helps command/agent contexts only — does NOT reach skill execution (skills aren't converter-transformed)
17
+ 4. Added CLAUDE.md skill compliance policy as a third deliverable to prevent recurrence
18
+ 5. Separated two distinct failure modes: tool-not-found error vs silent auto-configuration
19
+
20
+ ### New Considerations Discovered
21
+ - Only Pi converter transforms `AskUserQuestion` (incompletely); all others pass skill content through verbatim — the codex-agents.ts fix is independent of skill execution
22
+ - `add-workflow.md` and `audit-skill.md` already explicitly prohibit `AskUserQuestion` — this undocumented policy should be formalized
23
+ - Prose fallback is probabilistic (LLM compliance); converter-level transformation is the correct long-term architectural fix
24
+ - The brainstorming skill avoids `AskUserQuestion` entirely and works cross-platform — that's the gold standard pattern
25
+
26
+ ---
27
+
28
+ # fix: Setup Skill Cross-Platform Fallback for AskUserQuestion
29
+
30
+ ## Overview
31
+
32
+ The `setup` skill uses `AskUserQuestion` at 5 decision points. On non-Claude platforms (Codex, Gemini, OpenCode, Copilot, Kiro, etc.), this tool doesn't exist — the LLM reads the skill body but cannot call the tool, causing silent failure or unconsented auto-configuration. Fix by adding a minimal fallback instruction to the skill body, applying the same to `create-new-skill.md`, and adding a policy to the CLAUDE.md skill checklist to prevent recurrence.
33
+
34
+ ## Problem Statement
35
+
36
+ **Two distinct failure modes:**
37
+
38
+ 1. **Tool-not-found error** — LLM tries to call `AskUserQuestion` as a function; platform returns an error. Setup halts.
39
+ 2. **Silent skip** — LLM reads `AskUserQuestion` as prose, ignores the decision gate, auto-configures. User never consulted. This is worse — produces a `compound-engineering.local.md` the user never approved.
40
+
41
+ `plugins/compound-engineering/skills/setup/SKILL.md` has 5 `AskUserQuestion` blocks:
42
+
43
+ | Line | Decision Point |
44
+ |------|----------------|
45
+ | 13 | Check existing config: Reconfigure / View / Cancel |
46
+ | 44 | Stack detection: Auto-configure / Customize |
47
+ | 67 | Stack override (multi-option) |
48
+ | 85 | Focus areas (multiSelect) |
49
+ | 104 | Review depth: Thorough / Fast / Comprehensive |
50
+
51
+ `plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md` lines 22 and 45 also use `AskUserQuestion`.
52
+
53
+ Only the Pi converter transforms the reference (incompletely). All other converters (Codex, Gemini, Copilot, Kiro, Droid, Windsurf) pass skill content through verbatim — **skills are not converter-transformed**.
54
+
55
+ ## Proposed Solution
56
+
57
+ Three deliverables, each addressing a different layer:
58
+
59
+ ### 1. Add 4-line "Interaction Method" preamble to `setup/SKILL.md`
60
+
61
+ Immediately after the `# Compound Engineering Setup` heading, insert:
62
+
63
+ ```markdown
64
+ ## Interaction Method
65
+
66
+ If `AskUserQuestion` is available, use it for all prompts below.
67
+
68
+ If not, present each question as a numbered list and wait for a reply before proceeding to the next step. For multiSelect questions, accept comma-separated numbers (e.g. `1, 3`). Never skip or auto-configure.
69
+ ```
70
+
71
+ **Why 4 lines, not 16:** LLMs know what a numbered list is — no example blockquote needed. The branching condition is tool availability, not platform identity — no platform name list needed (YAGNI: new platforms will be added and lists go stale). State the "never skip" rule once here; don't repeat it in `codex-agents.ts`.
72
+
73
+ **Why this works:** The skill body IS read by the LLM on all platforms when `/setup` is invoked. The agent follows prose instructions regardless of tool availability. This is the same pattern `brainstorming/SKILL.md` uses — it avoids `AskUserQuestion` entirely and uses inline numbered lists — the gold standard cross-platform approach.
74
+
75
+ ### 2. Apply the same preamble to `create-new-skill.md`
76
+
77
+ `plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md` uses `AskUserQuestion` at lines 22 and 45. Apply an identical preamble at the top of that file.
78
+
79
+ ### 3. Strengthen `codex-agents.ts` AskUserQuestion mapping
80
+
81
+ This change does NOT fix skill execution (skills bypass the converter pipeline). It improves the AGENTS.md guidance for Codex command/agent contexts.
82
+
83
+ Replace (`src/utils/codex-agents.ts` line 21):
84
+ ```
85
+ - AskUserQuestion/Question: ask the user in chat
86
+ ```
87
+
88
+ With:
89
+ ```
90
+ - AskUserQuestion/Question: present choices as a numbered list in chat and wait for a reply number. For multi-select (multiSelect: true), accept comma-separated numbers. Never skip or auto-configure — always wait for the user's response before proceeding.
91
+ ```
92
+
93
+ ### 4. Add lint rule to CLAUDE.md skill compliance checklist
94
+
95
+ Add to the "Skill Compliance Checklist" in `plugins/compound-engineering/CLAUDE.md`:
96
+
97
+ ```
98
+ ### AskUserQuestion Usage
99
+
100
+ - [ ] If the skill uses `AskUserQuestion`, it must include an "Interaction Method" preamble explaining the numbered-list fallback for non-Claude environments
101
+ - [ ] Prefer avoiding `AskUserQuestion` entirely (see brainstorming/SKILL.md pattern) for skills intended to run cross-platform
102
+ ```
103
+
104
+ ## Technical Considerations
105
+
106
+ - `setup/SKILL.md` has `disable-model-invocation: true` — this controls session-startup context loading only, not skill-body execution at invocation time
107
+ - The prose fallback is probabilistic (LLM compliance), not a build-time guarantee. The correct long-term architectural fix is converter-level transformation of skill content (a `transformSkillContent()` pass in each converter), but that is out of scope here
108
+ - Commands with `AskUserQuestion` (`ce/brainstorm.md`, `ce/plan.md`, `test-browser.md`, etc.) have the same gap but are out of scope — explicitly noted as a future task
109
+
110
+ ## Acceptance Criteria
111
+
112
+ - [ ] `setup/SKILL.md` has a 4-line "Interaction Method" preamble after the opening heading
113
+ - [ ] `create-new-skill.md` has the same preamble
114
+ - [ ] The skills still use `AskUserQuestion` as primary — no change to Claude Code behavior
115
+ - [ ] `codex-agents.ts` AskUserQuestion line updated with structured guidance
116
+ - [ ] `plugins/compound-engineering/CLAUDE.md` skill checklist includes AskUserQuestion policy
117
+ - [ ] No regression: on Claude Code, setup works exactly as before
118
+
119
+ ## Files
120
+
121
+ - `plugins/compound-engineering/skills/setup/SKILL.md` — Add 4-line preamble after line 8
122
+ - `plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md` — Add same preamble at top
123
+ - `src/utils/codex-agents.ts` — Strengthen AskUserQuestion mapping (line 21)
124
+ - `plugins/compound-engineering/CLAUDE.md` — Add AskUserQuestion policy to skill compliance checklist
125
+
126
+ ## Future Work (Out of Scope)
127
+
128
+ - Converter-level `transformSkillContent()` for all targets — build-time guarantee instead of prose fallback
129
+ - Commands with `AskUserQuestion` (`ce/brainstorm.md`, `ce/plan.md`, `test-browser.md`) — same failure mode, separate fix
130
+
131
+ ## Sources & References
132
+
133
+ - Issue: [#204](https://github.com/EveryInc/compound-engineering-plugin/issues/204)
134
+ - `plugins/compound-engineering/skills/setup/SKILL.md:13,44,67,85,104`
135
+ - `plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md:22,45`
136
+ - `src/utils/codex-agents.ts:21`
137
+ - `src/converters/claude-to-pi.ts:106` — Pi converter (reference pattern)
138
+ - `plugins/compound-engineering/skills/brainstorming/SKILL.md` — gold standard cross-platform skill (no AskUserQuestion)
139
+ - `plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md:12,37` — existing "DO NOT use AskUserQuestion" policy
140
+ - `docs/solutions/adding-converter-target-providers.md`