@codemcp/ade 0.5.0 → 0.6.1

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 (33) hide show
  1. package/.beads/issues.jsonl +24 -0
  2. package/.beads/last-touched +1 -1
  3. package/.vibe/beads-state-ade-fix-zod-7eypxn.json +34 -0
  4. package/.vibe/beads-state-ade-main-iazal7.json +29 -0
  5. package/.vibe/beads-state-ade-partially-skilled-ywlqhb.json +24 -0
  6. package/.vibe/development-plan-extensibility.md +169 -0
  7. package/.vibe/development-plan-fix-zod.md +72 -0
  8. package/.vibe/development-plan-partially-skilled.md +44 -0
  9. package/ade.extensions.mjs +66 -0
  10. package/docs/adr/0002-extension-file-type-safety.md +97 -0
  11. package/docs/guide/extensions.md +187 -0
  12. package/package.json +3 -2
  13. package/packages/cli/dist/index.js +33333 -12021
  14. package/packages/cli/package.json +4 -2
  15. package/packages/cli/src/commands/extensions.integration.spec.ts +122 -0
  16. package/packages/cli/src/commands/install.spec.ts +21 -1
  17. package/packages/cli/src/commands/install.ts +10 -5
  18. package/packages/cli/src/commands/setup.ts +8 -4
  19. package/packages/cli/src/extensions.spec.ts +128 -0
  20. package/packages/cli/src/extensions.ts +71 -0
  21. package/packages/cli/src/index.ts +10 -5
  22. package/packages/cli/tsup.config.ts +7 -1
  23. package/packages/core/package.json +3 -2
  24. package/packages/core/src/catalog/facets/process.ts +174 -0
  25. package/packages/core/src/catalog/index.ts +38 -1
  26. package/packages/core/src/extensions.spec.ts +169 -0
  27. package/packages/core/src/index.ts +3 -1
  28. package/packages/core/src/types.ts +71 -0
  29. package/packages/harnesses/package.json +1 -1
  30. package/packages/harnesses/src/index.spec.ts +48 -1
  31. package/packages/harnesses/src/index.ts +10 -0
  32. package/pnpm-workspace.yaml +2 -0
  33. /package/docs/{adrs → adr}/0001-tui-framework-selection.md +0 -0
@@ -60,3 +60,27 @@
60
60
  {"id":"ade-5.1","title":"Explore","description":"Understand the problem, analyze existing patterns, and design your approach. Consider the scope and impact of the change. **STEP 1: Analyze Requirements** - If exists: Use it to understand the required changes - Otherwise: Document requirements in your task management system **STEP 2: Review Design Approach** - If exists: Respect the design approach documented in - Otherwise: Design your approach based on the problem analysis **STEP 3: Document Decisions** - Document your analysis and design decisions - Create tasks to guide implementation - Focus on analysis and design only - do not write any code yet","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T11:33:13.459272+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T11:33:13.459272+01:00","dependencies":[{"issue_id":"ade-5.1","depends_on_id":"ade-5","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
61
61
  {"id":"ade-5.2","title":"Implement","description":"Write clean, focused code for the minor enhancement, test your changes, and prepare for commit. **STEP 1: Review Design and Requirements** - If exists: Follow your design from - Otherwise: Elaborate design options and present them to the user - If exists: Ensure the relevant requirements from are met - Otherwise: Ensure existing requirements are met based on your task context **STEP 2: Implement Changes** - Write clean, focused code for the minor enhancement - Test your changes to ensure they work correctly and don't break existing functionality **STEP 3: Prepare for Finalization** - Update task progress as needed - Prepare documentation and commit when ready","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T11:33:13.597501+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T11:33:13.597501+01:00","dependencies":[{"issue_id":"ade-5.2","depends_on_id":"ade-5","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-5.2","depends_on_id":"ade-5.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
62
62
  {"id":"ade-5.3","title":"Finalize","description":"Ensure code quality and documentation accuracy through systematic cleanup and review. **STEP 1: Code Cleanup** Systematically clean up development artifacts: - **Remove Debug Output**: Search for and remove all temporary debug output statements used during development. Look for language-specific debug output methods (console logging, print statements, debug output functions). Remove any debugging statements that were added for development purposes. - **Review TODO/FIXME Comments**: - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred - Remove completed TODOs - Convert remaining TODOs to proper issue tracking if needed - **Remove Debugging Code Blocks**: - Remove temporary debugging code, test code blocks, and commented-out code - Clean up any experimental code that's no longer needed - Ensure proper error handling replaces temporary debug logging **STEP 2: Documentation Review** Review and update documentation to reflect final implementation: - **Update Long-Term Memory Documents**: Based on what was actually implemented: - If exists: Update if requirements changed during development - If exists: Update if design details were refined or changed - **Compare Against Implementation**: Review documentation against actual implemented functionality - **Update Changed Sections**: Only modify documentation sections that have functional changes - **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions - **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process - **Ask User to Review Document Updates** **STEP 3: Final Validation** - Run existing tests to ensure cleanup didn't break functionality - Verify documentation accuracy with a final review - Ensure minor enhancement is ready for delivery - Update task progress and mark completed work as you finalize the minor enhancement","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T11:33:13.733496+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T11:33:13.733496+01:00","dependencies":[{"issue_id":"ade-5.3","depends_on_id":"ade-5","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-5.3","depends_on_id":"ade-5.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
63
+ {"id":"ade-6","title":"ade: epcc (development-plan.md)","description":"Responsible vibe engineering session using epcc workflow for ade","status":"closed","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T16:48:54.346525+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T20:46:05.46088+01:00","closed_at":"2026-03-19T20:46:05.46088+01:00","close_reason":"Closed"}
64
+ {"id":"ade-6.1","title":"Explore","description":"Research the codebase to understand existing patterns and gather context about the problem space. - If uncertain about conventions or rules, ask the user about them - Read relevant files and documentation - If exists: Understand and document requirements there - Otherwise: Document requirements in your task management system Focus on understanding without writing code yet. Document your findings and create tasks as needed.","status":"closed","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T16:48:54.522007+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T20:46:05.255704+01:00","closed_at":"2026-03-19T20:46:05.255704+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.1","depends_on_id":"ade-6","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
65
+ {"id":"ade-6.2","title":"Plan","description":"Create a detailed implementation strategy based on your exploration: - If exists: Base your strategy on requirements from it - Otherwise: Use existing task context Break down the work into specific, actionable tasks. Consider edge cases, dependencies, and potential challenges. - If architectural changes needed and exists: Document in - Otherwise: Create tasks to track architectural decisions - If exists: Adhere to the design in it - Otherwise: Elaborate design options and present them to the user Document the planning work thoroughly and create implementation tasks as part of the code phase as needed.","status":"closed","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T16:48:54.661272+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T20:46:05.353452+01:00","closed_at":"2026-03-19T20:46:05.353452+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.2","depends_on_id":"ade-6","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.2","depends_on_id":"ade-6.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
66
+ {"id":"ade-6.3","title":"Code","description":"Follow your plan to build the solution: - If exists: Follow the design from it - Otherwise: Elaborate design options and present them to the user - If exists: Build according to the architecture from it - Otherwise: Elaborate architectural options and present them to the user - If exists: Ensure requirements from it are met - Otherwise: Ensure existing requirements are met based on your task context Write clean, well-structured code with proper error handling. Prevent regression by building, linting, and executing existing tests. Stay flexible and adapt the plan as you learn more during implementation. Update task progress and create new tasks as needed.","status":"closed","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T16:48:54.813402+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T19:29:11.362541+01:00","closed_at":"2026-03-19T19:29:11.362541+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3","depends_on_id":"ade-6","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3","depends_on_id":"ade-6.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
67
+ {"id":"ade-6.3.1","title":"Add AdeExtensions interface and AdeExtensionsSchema (Zod) to packages/core/src/types.ts","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:05.210558+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:15.234448+01:00","closed_at":"2026-03-19T17:48:15.234448+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.1","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
68
+ {"id":"ade-6.3.2","title":"Add mergeExtensions() to packages/core/src/catalog/index.ts","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:05.382003+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:15.336955+01:00","closed_at":"2026-03-19T17:48:15.336955+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.2","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.2","depends_on_id":"ade-6.3.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
69
+ {"id":"ade-6.3.3","title":"Export AdeExtensions, AdeExtensionsSchema, mergeExtensions from packages/core/src/index.ts","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:05.523449+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:15.438591+01:00","closed_at":"2026-03-19T17:48:15.438591+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.3","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.3","depends_on_id":"ade-6.3.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.3","depends_on_id":"ade-6.3.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
70
+ {"id":"ade-6.3.4","title":"Add jiti as CLI dependency and zod as core dependency","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:05.663512+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:15.53763+01:00","closed_at":"2026-03-19T17:48:15.53763+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.4","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
71
+ {"id":"ade-6.3.5","title":"Create packages/cli/src/extensions.ts with loadExtensions(projectRoot)","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:05.81068+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:15.632037+01:00","closed_at":"2026-03-19T17:48:15.632037+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.5","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.5","depends_on_id":"ade-6.3.4","type":"blocks","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.5","depends_on_id":"ade-6.3.3","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
72
+ {"id":"ade-6.3.6","title":"Wire extension loading into packages/cli/src/index.ts (setup + install commands)","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:05.953907+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:19.642615+01:00","closed_at":"2026-03-19T17:48:19.642615+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.6","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.6","depends_on_id":"ade-6.3.5","type":"blocks","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.6","depends_on_id":"ade-6.3.7","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
73
+ {"id":"ade-6.3.7","title":"Expose buildHarnessWriters(extensions) in packages/harnesses/src/index.ts","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:06.106652+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:15.854204+01:00","closed_at":"2026-03-19T17:48:15.854204+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.7","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
74
+ {"id":"ade-6.3.8","title":"Create ade.extensions.mjs SAP example in repo root","status":"closed","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T17:10:06.230083+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T17:48:19.753233+01:00","closed_at":"2026-03-19T17:48:19.753233+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.3.8","depends_on_id":"ade-6.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.3.8","depends_on_id":"ade-6.3.6","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
75
+ {"id":"ade-6.4","title":"Commit","description":"Ensure code quality and documentation accuracy through systematic cleanup and review. **STEP 1: Code Cleanup** Systematically clean up development artifacts: 1. **Remove Debug Output**: Search for and remove all temporary debug output statements used during development. Look for language-specific debug output methods (console logging, print statements, debug output functions). Remove any debugging statements that were added for development purposes. 2. **Review TODO/FIXME Comments**: - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred - Remove completed TODOs - Convert remaining TODOs to proper issue tracking if needed 3. **Remove Debugging Code Blocks**: - Remove temporary debugging code, test code blocks, and commented-out code - Clean up any experimental code that's no longer needed - Ensure proper error handling replaces temporary debug logging **STEP 2: Documentation Review** Review and update documentation to reflect final implementation: 1. **Update Long-Term Memory Documents**: Based on what was actually implemented: - If exists: Update it if requirements changed during development - If exists: Update it if architectural impacts were identified - If exists: Update it if design details were refined or changed - Otherwise: Document any changes in the plan file 2. **Compare Against Implementation**: Review documentation against actual implemented functionality 3. **Update Changed Sections**: Only modify documentation sections that have functional changes 4. **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions 5. **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process 6. **Ask User to Review Document Updates** **STEP 3: Final Validation** - Run existing tests to ensure cleanup didn't break functionality - Verify documentation accuracy with a final review - Ensure code is ready for production/delivery Update task progress and mark completed work as you finalize the feature.","status":"closed","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T16:48:54.960844+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T19:37:20.65686+01:00","closed_at":"2026-03-19T19:29:11.477044+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.4","depends_on_id":"ade-6","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-6.4","depends_on_id":"ade-6.3","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
76
+ {"id":"ade-6.4.1","title":"e2e integration test: extension option produces skills + knowledge in setup output","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-19T19:30:47.327614+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-19T19:32:06.768961+01:00","closed_at":"2026-03-19T19:32:06.768961+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-6.4.1","depends_on_id":"ade-6.4","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
77
+ {"id":"ade-7","title":"ade: minor (development-plan-partially-skilled.md)","description":"Responsible vibe engineering session using minor workflow for ade","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:36:47.537604+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:36:47.537604+01:00"}
78
+ {"id":"ade-7.1","title":"Explore","description":"Understand the problem, analyze existing patterns, and design your approach. Consider the scope and impact of the change. **STEP 1: Analyze Requirements** - If exists: Use it to understand the required changes - Otherwise: Document requirements in your task management system **STEP 2: Review Design Approach** - If exists: Respect the design approach documented in - Otherwise: Design your approach based on the problem analysis **STEP 3: Document Decisions** - Document your analysis and design decisions - Create tasks to guide implementation - Focus on analysis and design only - do not write any code yet","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:36:47.694345+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:36:47.694345+01:00","dependencies":[{"issue_id":"ade-7.1","depends_on_id":"ade-7","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
79
+ {"id":"ade-7.2","title":"Implement","description":"Write clean, focused code for the minor enhancement, test your changes, and prepare for commit. **STEP 1: Review Design and Requirements** - If exists: Follow your design from - Otherwise: Elaborate design options and present them to the user - If exists: Ensure the relevant requirements from are met - Otherwise: Ensure existing requirements are met based on your task context **STEP 2: Implement Changes** - Write clean, focused code for the minor enhancement - Test your changes to ensure they work correctly and don't break existing functionality **STEP 3: Prepare for Finalization** - Update task progress as needed - Prepare documentation and commit when ready","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:36:47.863047+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:36:47.863047+01:00","dependencies":[{"issue_id":"ade-7.2","depends_on_id":"ade-7","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-7.2","depends_on_id":"ade-7.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
80
+ {"id":"ade-7.3","title":"Finalize","description":"Ensure code quality and documentation accuracy through systematic cleanup and review. **STEP 1: Code Cleanup** Systematically clean up development artifacts: - **Remove Debug Output**: Search for and remove all temporary debug output statements used during development. Look for language-specific debug output methods (console logging, print statements, debug output functions). Remove any debugging statements that were added for development purposes. - **Review TODO/FIXME Comments**: - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred - Remove completed TODOs - Convert remaining TODOs to proper issue tracking if needed - **Remove Debugging Code Blocks**: - Remove temporary debugging code, test code blocks, and commented-out code - Clean up any experimental code that's no longer needed - Ensure proper error handling replaces temporary debug logging **STEP 2: Documentation Review** Review and update documentation to reflect final implementation: - **Update Long-Term Memory Documents**: Based on what was actually implemented: - If exists: Update if requirements changed during development - If exists: Update if design details were refined or changed - **Compare Against Implementation**: Review documentation against actual implemented functionality - **Update Changed Sections**: Only modify documentation sections that have functional changes - **Remove Development Progress**: Remove references to development iterations, progress notes, and temporary decisions - **Focus on Final State**: Ensure documentation describes the final implemented state, not the development process - **Ask User to Review Document Updates** **STEP 3: Final Validation** - Run existing tests to ensure cleanup didn't break functionality - Verify documentation accuracy with a final review - Ensure minor enhancement is ready for delivery - Update task progress and mark completed work as you finalize the minor enhancement","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:36:48.033779+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:36:48.033779+01:00","dependencies":[{"issue_id":"ade-7.3","depends_on_id":"ade-7","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-7.3","depends_on_id":"ade-7.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
81
+ {"id":"ade-8","title":"ade: bugfix (development-plan-fix-zod.md)","description":"Responsible vibe engineering session using bugfix workflow for ade","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:52:50.196761+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:52:50.196761+01:00"}
82
+ {"id":"ade-8.1","title":"Reproduce","description":"Gather specific information to reliably reproduce the reported bug: - What are the exact OS, browser/runtime versions, and hardware specs? - What is the precise sequence of actions that trigger the bug? - What error messages, logs, or stack traces are available? - Does this happen every time or intermittently? - How many users are affected and what is the business impact? Create test cases that demonstrate the problem. Document your findings and create tasks as needed.","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:52:50.355911+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:52:50.355911+01:00","dependencies":[{"issue_id":"ade-8.1","depends_on_id":"ade-8","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
83
+ {"id":"ade-8.2","title":"Analyze","description":"Examine the code paths involved in the bug, identify the root cause, and understand why the issue occurs. Use debugging tools, add logging, and trace through the problematic code. Document your analysis and create tasks as needed.","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:52:50.505675+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:52:50.505675+01:00","dependencies":[{"issue_id":"ade-8.2","depends_on_id":"ade-8","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-8.2","depends_on_id":"ade-8.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
84
+ {"id":"ade-8.3","title":"Fix","description":"Implement the solution based on your analysis: - If exists: Follow the design from it - Otherwise: Elaborate design options and present them to the user Before implementing, assess the approach: - How critical is this system? What is the blast radius if the fix causes issues? - Should this be a minimal fix or a more comprehensive solution? Make targeted changes that address the root cause without introducing new issues. Be careful to maintain existing functionality while fixing the bug.","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:52:50.645347+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:52:50.645347+01:00","dependencies":[{"issue_id":"ade-8.3","depends_on_id":"ade-8","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-8.3","depends_on_id":"ade-8.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
85
+ {"id":"ade-8.4","title":"Verify","description":"Test the fix thoroughly to ensure the original bug is resolved and no new issues were introduced. Run existing tests, create new ones if needed, and verify the solution is robust.","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:52:50.824002+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:52:50.824002+01:00","dependencies":[{"issue_id":"ade-8.4","depends_on_id":"ade-8","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-8.4","depends_on_id":"ade-8.3","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
86
+ {"id":"ade-8.5","title":"Finalize","description":"Ensure code quality and documentation accuracy through systematic cleanup and review. **STEP 1: Code Cleanup** Systematically clean up development artifacts: - Remove all temporary debug output statements used during bug investigation (console logging, print statements, debug output functions) - Address each TODO/FIXME comment by either implementing the solution or documenting why it's deferred - Remove completed TODOs and convert remaining ones to proper issue tracking if needed - Remove temporary debugging code, test code blocks, and commented-out code - Ensure proper error handling replaces temporary debug logging **STEP 2: Documentation Review** Review and update documentation to reflect the bug fix: - If exists, update it if design details were refined or changed during the fix - Compare documentation against the actual bug fix implementation - Update only the documentation sections that have functional changes - Remove references to investigation iterations, progress notes, and temporary decisions - Ensure documentation describes the final fixed state, not the debugging process - Ask the user to review document updates **STEP 3: Final Validation** - Run existing tests to ensure cleanup didn't break functionality - Verify documentation accuracy with a final review - Ensure bug fix is ready for production - Update task progress and mark completed work as you finalize the bug fix","status":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T08:52:50.99667+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T08:52:50.99667+01:00","dependencies":[{"issue_id":"ade-8.5","depends_on_id":"ade-8","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-8.5","depends_on_id":"ade-8.4","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
@@ -1 +1 @@
1
- ade-5.3
1
+ ade-8.5
@@ -0,0 +1,34 @@
1
+ {
2
+ "conversationId": "ade-fix-zod-7eypxn",
3
+ "projectPath": "/Users/oliverjaegle/projects/privat/codemcp/ade",
4
+ "epicId": "ade-8",
5
+ "phaseTasks": [
6
+ {
7
+ "phaseId": "reproduce",
8
+ "phaseName": "Reproduce",
9
+ "taskId": "ade-8.1"
10
+ },
11
+ {
12
+ "phaseId": "analyze",
13
+ "phaseName": "Analyze",
14
+ "taskId": "ade-8.2"
15
+ },
16
+ {
17
+ "phaseId": "fix",
18
+ "phaseName": "Fix",
19
+ "taskId": "ade-8.3"
20
+ },
21
+ {
22
+ "phaseId": "verify",
23
+ "phaseName": "Verify",
24
+ "taskId": "ade-8.4"
25
+ },
26
+ {
27
+ "phaseId": "finalize",
28
+ "phaseName": "Finalize",
29
+ "taskId": "ade-8.5"
30
+ }
31
+ ],
32
+ "createdAt": "2026-03-20T07:52:51.502Z",
33
+ "updatedAt": "2026-03-20T07:52:51.502Z"
34
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "conversationId": "ade-main-iazal7",
3
+ "projectPath": "/Users/oliverjaegle/projects/privat/codemcp/ade",
4
+ "epicId": "ade-6",
5
+ "phaseTasks": [
6
+ {
7
+ "phaseId": "explore",
8
+ "phaseName": "Explore",
9
+ "taskId": "ade-6.1"
10
+ },
11
+ {
12
+ "phaseId": "plan",
13
+ "phaseName": "Plan",
14
+ "taskId": "ade-6.2"
15
+ },
16
+ {
17
+ "phaseId": "code",
18
+ "phaseName": "Code",
19
+ "taskId": "ade-6.3"
20
+ },
21
+ {
22
+ "phaseId": "commit",
23
+ "phaseName": "Commit",
24
+ "taskId": "ade-6.4"
25
+ }
26
+ ],
27
+ "createdAt": "2026-03-19T15:48:55.317Z",
28
+ "updatedAt": "2026-03-19T15:48:55.317Z"
29
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "conversationId": "ade-partially-skilled-ywlqhb",
3
+ "projectPath": "/Users/oliverjaegle/projects/privat/codemcp/ade",
4
+ "epicId": "ade-7",
5
+ "phaseTasks": [
6
+ {
7
+ "phaseId": "explore",
8
+ "phaseName": "Explore",
9
+ "taskId": "ade-7.1"
10
+ },
11
+ {
12
+ "phaseId": "implement",
13
+ "phaseName": "Implement",
14
+ "taskId": "ade-7.2"
15
+ },
16
+ {
17
+ "phaseId": "finalize",
18
+ "phaseName": "Finalize",
19
+ "taskId": "ade-7.3"
20
+ }
21
+ ],
22
+ "createdAt": "2026-03-20T07:36:48.277Z",
23
+ "updatedAt": "2026-03-20T07:36:48.277Z"
24
+ }
@@ -0,0 +1,169 @@
1
+ # Development Plan: ade (main branch)
2
+
3
+ *Generated on 2026-03-19 by Vibe Feature MCP*
4
+ *Workflow: [epcc](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/epcc)*
5
+
6
+ ## Goal
7
+
8
+ Make the ADE project extensible so that forks/downstream consumers can add new facets, options, and harness writers without modifying the upstream source files. The goal is upstream-compatibility — consumers should be able to pull upstream changes without merge conflicts caused by modifications to core catalog or registry files.
9
+
10
+ ## Explore
11
+ <!-- beads-phase-id: ade-6.1 -->
12
+ ### Tasks
13
+ - [x] Explore codebase structure: packages/core, packages/harnesses, packages/cli
14
+ - [x] Understand how catalog, registry, and writers are wired together
15
+ - [x] Identify all the places consumers currently need to modify to extend
16
+
17
+ ### Findings
18
+
19
+ **Current extension points require modifying upstream files:**
20
+ 1. **Adding a new facet/option** → must edit `packages/core/src/catalog/index.ts` (`getDefaultCatalog()`) and add a new file in `catalog/facets/`
21
+ 2. **Adding a new provision writer** → must edit `packages/core/src/registry.ts` (`createDefaultRegistry()`)
22
+ 3. **Adding a new harness writer** → must edit `packages/harnesses/src/index.ts` (`allHarnessWriters` array + `getHarnessWriter` + `getHarnessIds`)
23
+ 4. **Wiring it all into the CLI** → `packages/cli/src/index.ts` calls `getDefaultCatalog()` and relies on `allHarnessWriters` from harnesses
24
+
25
+ **Existing infrastructure that's already extensible:**
26
+ - `WriterRegistry` + `registerProvisionWriter/registerAgentWriter` already exist as a general-purpose registry
27
+ - `Catalog` and `Facet` types are public and composable
28
+ - `createRegistry()` + `createDefaultRegistry()` already allow building custom registries
29
+ - `resolve()` accepts a `Catalog` and `WriterRegistry` — so it's already injection-ready
30
+ - `runSetup(projectRoot, catalog)` already takes a `catalog` parameter
31
+
32
+ **Key insight:** The CLI's `index.ts` is the main wiring point. It hardcodes `getDefaultCatalog()` and `allHarnessWriters`. The CLI needs a plugin/extension loading mechanism so forks can inject their extensions without modifying the upstream entry point.
33
+
34
+ ## Plan
35
+ <!-- beads-phase-id: ade-6.2 -->
36
+
37
+ ### Phase Entrance Criteria:
38
+ - [x] The codebase has been thoroughly explored
39
+ - [x] Current extension points and blockers are identified
40
+ - [x] It's clear what's in scope and what's out of scope
41
+
42
+ ### Tasks
43
+
44
+ *Tasks managed via `bd` CLI*
45
+
46
+ ## Code
47
+ <!-- beads-phase-id: ade-6.3 -->
48
+
49
+ ### Phase Entrance Criteria:
50
+ - [ ] Design is documented and reviewed
51
+ - [ ] Scope is agreed upon: what changes are needed and where
52
+ - [ ] No open design questions remain
53
+
54
+ ### Tasks
55
+
56
+ *Tasks managed via `bd` CLI*
57
+
58
+ ## Commit
59
+ <!-- beads-phase-id: ade-6.4 -->
60
+
61
+ ### Phase Entrance Criteria:
62
+ - [ ] All code changes are implemented and tested
63
+ - [ ] Existing tests pass
64
+ - [ ] The extension mechanism works end-to-end (catalog + writers + harnesses injectable)
65
+
66
+ ### Tasks
67
+ - [ ] Squash WIP commits: `git reset --soft <first commit of this branch>`. Then, create a conventional commit. In the message, first summarize the intentions and key decisions from the development plan. Then, add a brief summary of the key changes and their side effects and dependencies
68
+
69
+ *Tasks managed via `bd` CLI*
70
+
71
+ ## Key Decisions
72
+
73
+ ### KD-1: Extension model — `ade.extensions.mjs` with declarative contributions
74
+
75
+ A consumer creates `ade.extensions.mjs` (or `.js`) in their project (or in a forked CLI's src dir).
76
+ The CLI loads it via dynamic `import()` at startup and merges contributions before resolving.
77
+
78
+ The extension file exports a default object conforming to `AdeExtensions`:
79
+
80
+ ```ts
81
+ interface AdeExtensions {
82
+ // Contribute new options into existing facets (e.g. add "SAP" to "architecture")
83
+ facetContributions?: Record<string, Option[]>
84
+ // Register entirely new facets
85
+ facets?: Facet[]
86
+ // Register new provision writers (e.g. a "sap-config" writer)
87
+ provisionWriters?: ProvisionWriterDef[]
88
+ // Register new harness writers (e.g. a custom IDE)
89
+ harnessWriters?: HarnessWriter[]
90
+ }
91
+ ```
92
+
93
+ **Why this model:**
94
+ - `facetContributions` (keyed by facet id) is the right primitive for the SAP use case:
95
+ SAP is a new *option* inside the existing `architecture` facet, not a new facet.
96
+ - `facets` covers the case where a consumer wants to add a completely new facet (e.g. "cloud-provider").
97
+ - `provisionWriters` and `harnessWriters` cover the writer extension cases.
98
+ - The consumer never needs to modify upstream files.
99
+ - Dynamic `import()` means no build step required for `.mjs` extensions.
100
+
101
+ ### KD-2: Loading location
102
+
103
+ The extension file is resolved relative to the **project root** passed to the CLI.
104
+ Search order: `ade.extensions.mjs` → `ade.extensions.js` (first match wins).
105
+ This works for both the "consumer uses npx @codemcp/ade setup" case and the "fork scenario".
106
+
107
+ ### KD-3: Type exports
108
+
109
+ `AdeExtensions`, `HarnessWriter` (re-exported from harnesses), and all catalog/writer types
110
+ are already exported from `@codemcp/ade-core`. We need to add `AdeExtensions` to the exports.
111
+ No breaking changes to existing APIs.
112
+
113
+ ### KD-4: SAP example placement
114
+
115
+ The SAP example (`sap` option on the `architecture` facet) will be implemented as a concrete
116
+ `ade.extensions.mjs` example file **in the repo root** (not bundled into the catalog).
117
+ This doubles as the integration test and documentation for the extension mechanism.
118
+
119
+ ### KD-5: Type safety for extension loading → documented in `docs/adrs/0002-extension-file-type-safety.md`
120
+
121
+ Runtime Zod validation (always) + `jiti` for `.ts` extension files + `AdeExtensions` type export for JSDoc consumers.
122
+
123
+ ## Notes
124
+
125
+ **SAP Architecture option shape** (what the consumer writes):
126
+ ```js
127
+ // ade.extensions.mjs
128
+ import { } from '@codemcp/ade-core' // types only if needed
129
+
130
+ const sapOption = {
131
+ id: 'sap',
132
+ label: 'SAP',
133
+ description: 'SAP development with ABAP, CAP (Cloud Application Programming model), and BTP',
134
+ recipe: [
135
+ {
136
+ writer: 'skills',
137
+ config: {
138
+ skills: [
139
+ { name: 'sap-architecture', description: '...', body: '...' },
140
+ { name: 'sap-design', description: '...', body: '...' },
141
+ ]
142
+ }
143
+ }
144
+ ],
145
+ docsets: [
146
+ { id: 'cap-docs', label: 'SAP CAP', origin: 'https://github.com/SAP/cloud-sdk.git', description: '...' }
147
+ ]
148
+ }
149
+
150
+ export default {
151
+ facetContributions: {
152
+ architecture: [sapOption]
153
+ }
154
+ }
155
+ ```
156
+
157
+ The CLI then calls `mergeExtensions(catalog, registry, extensions)` before running setup/install.
158
+
159
+ **Files to create/modify:**
160
+ 1. `packages/core/src/types.ts` — add `AdeExtensions` type
161
+ 2. `packages/core/src/catalog/index.ts` — add `mergeExtensions(catalog, extensions)` function
162
+ 3. `packages/core/src/index.ts` — export `AdeExtensions` and `mergeExtensions`
163
+ 4. `packages/cli/src/extensions.ts` — new file: `loadExtensions(projectRoot)` using dynamic import
164
+ 5. `packages/cli/src/index.ts` — load extensions and pass merged catalog/registry to setup/install
165
+ 6. `packages/harnesses/src/index.ts` — expose `mergeHarnessWriters` or accept additional writers
166
+ 7. `ade.extensions.mjs` — example file in repo root with the SAP architecture option
167
+
168
+ ---
169
+ *This plan is maintained by the LLM and uses beads CLI for task management. Tool responses provide guidance on which bd commands to use for task management.*
@@ -0,0 +1,72 @@
1
+ # Development Plan: ade (fix-zod branch)
2
+
3
+ *Generated on 2026-03-20 by Vibe Feature MCP*
4
+ *Workflow: [bugfix](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/bugfix)*
5
+
6
+ ## Goal
7
+ Fix the packaged version of `@codemcp/ade` CLI failing with `ERR_MODULE_NOT_FOUND` for `zod` after the latest extensibility enhancement.
8
+
9
+ ## Reproduce
10
+ <!-- beads-phase-id: ade-8.1 -->
11
+ ### Tasks
12
+
13
+ - [ ] Identify where `zod` was introduced in the codebase
14
+ - [ ] Understand whether `zod` is listed as a dependency or devDependency
15
+ - [ ] Confirm the build/bundle configuration to determine if it should be bundled or declared external
16
+
17
+ ## Analyze
18
+ <!-- beads-phase-id: ade-8.2 -->
19
+
20
+ ### Phase Entrance Criteria:
21
+ - [ ] The bug is reproducible or the root cause is clear from code inspection
22
+ - [ ] The affected code path is identified
23
+
24
+ ### Tasks
25
+
26
+ - [ ] Determine why `zod` is not bundled into the CLI dist output
27
+ - [ ] Check build configuration (tsup / rollup / esbuild)
28
+ - [ ] Identify whether `zod` should be bundled or added as a runtime dependency
29
+
30
+ ## Fix
31
+ <!-- beads-phase-id: ade-8.3 -->
32
+
33
+ ### Phase Entrance Criteria:
34
+ - [ ] Root cause is clearly understood and documented
35
+ - [ ] Fix strategy is decided (bundle vs. add dependency)
36
+
37
+ ### Tasks
38
+
39
+ - [ ] Apply fix (either bundle zod or add it as a real dependency)
40
+ - [ ] Verify the dist output includes or correctly references zod
41
+
42
+ ## Verify
43
+ <!-- beads-phase-id: ade-8.4 -->
44
+
45
+ ### Phase Entrance Criteria:
46
+ - [ ] Fix has been applied
47
+ - [ ] Build has been re-run
48
+
49
+ ### Tasks
50
+
51
+ - [ ] Build the CLI package
52
+ - [ ] Verify the packaged CLI starts without `ERR_MODULE_NOT_FOUND`
53
+
54
+ ## Finalize
55
+ <!-- beads-phase-id: ade-8.5 -->
56
+
57
+ ### Phase Entrance Criteria:
58
+ - [ ] All verify tasks pass
59
+ - [ ] No regressions introduced
60
+
61
+ ### Tasks
62
+ - [ ] Squash WIP commits: `git reset --soft <first commit of this branch>`. Then, Create a conventional commit. In the message, first summarize the intentions and key decisions from the development plan. Then, add a brief summary of the key changes and their side effects and dependencies
63
+
64
+ ## Key Decisions
65
+ - **Bundle `zod` into CLI dist**: `zod` was added to `@codemcp/ade-core` for runtime validation of the new extension API (`AdeExtensionsSchema` in `types.ts`). The core package is built with plain `tsc`, leaving a bare `import { z } from "zod"` in its dist output. Since the CLI's tsup config inlines core via `noExternal`, but tsup does not recursively bundle core's own external deps, `zod` ended up as an unbundled external reference in the CLI output — causing `ERR_MODULE_NOT_FOUND` when installed globally via npx. Fix: add `"zod"` to `noExternal` in `packages/cli/tsup.config.ts` so tsup bundles it alongside the other inlined packages.
66
+
67
+ ## Notes
68
+ - The `yaml` package is in core's dependencies too — it also gets pulled in transitively. Currently yaml is also listed as a direct dep of CLI and appears to be handled differently (likely already bundled or handled via noExternal path). Worth monitoring if the same pattern would affect yaml in future.
69
+ - Bundle size went from ~1.26 MB to ~1.32 MB after adding zod (expected, zod is ~50 KB minified).
70
+
71
+ ---
72
+ *This plan is maintained by the LLM and uses beads CLI for task management. Tool responses provide guidance on which bd commands to use for task management.*
@@ -0,0 +1,44 @@
1
+ # Development Plan: ade (partially-skilled branch)
2
+
3
+ *Generated on 2026-03-20 by Vibe Feature MCP*
4
+ *Workflow: [minor](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/minor)*
5
+
6
+ ## Goal
7
+ Add a new "CodeMCP Workflows (Skilled)" option to the process facet that includes the `VIBE_WORKFLOW_DOMAINS=skilled` env variable and all necessary skills (starting-project, architecture, design, coding, testing) as writers in the recipe.
8
+
9
+ ## Explore
10
+ <!-- beads-phase-id: ade-7.1 -->
11
+
12
+ ### Phase Entrance Criteria
13
+ - (initial phase, no entrance criteria)
14
+
15
+ ### Tasks
16
+
17
+ *Tasks managed via `bd` CLI*
18
+
19
+ ## Implement
20
+ <!-- beads-phase-id: ade-7.2 -->
21
+
22
+ ### Phase Entrance Criteria
23
+ - [ ] The current state of `process.ts` and available skill IDs are understood
24
+ - [ ] The new option's recipe structure is clear (which skills to include, what env vars to set)
25
+
26
+ ### Tasks
27
+
28
+ *Tasks managed via `bd` CLI*
29
+
30
+ ## Finalize
31
+ <!-- beads-phase-id: ade-7.3 -->
32
+ ### Tasks
33
+ - [ ] Squash WIP commits: `git reset --soft <first commit of this branch>. Then, Create a conventional commit. In the message, first summarize the intentions and key decisions from the development plan. Then, add a brief summary of the key changes and their side effects and dependencies
34
+
35
+ *Tasks managed via `bd` CLI*
36
+
37
+ ## Key Decisions
38
+ *Important decisions will be documented here as they are made*
39
+
40
+ ## Notes
41
+ *Additional context and observations*
42
+
43
+ ---
44
+ *This plan is maintained by the LLM and uses beads CLI for task management. Tool responses provide guidance on which bd commands to use for task management.*
@@ -0,0 +1,66 @@
1
+ /**
2
+ * ade.extensions.mjs — SAP BTP / ABAP architecture extension example
3
+ *
4
+ * Place this file in your project root to extend the default ADE catalog
5
+ * without modifying any upstream source files.
6
+ *
7
+ * This file serves as both documentation and an integration example.
8
+ * It is by no means functional! It's about providing options with dependent
9
+ * skills and documentation sources.
10
+ * TypeScript consumers can use ade.extensions.ts with full IDE type-checking.
11
+ *
12
+ * @type {import('@codemcp/ade-core').AdeExtensions}
13
+ */
14
+ export default {
15
+ facetContributions: {
16
+ architecture: [
17
+ {
18
+ id: "sap-abap",
19
+ label: "SAP BTP / ABAP",
20
+ description:
21
+ "SAP Business Technology Platform with ABAP Cloud development",
22
+ recipe: [
23
+ {
24
+ writer: "skills",
25
+ config: {
26
+ skills: [
27
+ {
28
+ name: "sap-abap-architecture",
29
+ source: "your-org/ade-sap/skills/sap-abap-architecture"
30
+ },
31
+ {
32
+ name: "sap-abap-code",
33
+ source: "your-org/ade-sap/skills/sap-abap-code"
34
+ },
35
+ {
36
+ name: "sap-abap-testing",
37
+ source: "your-org/ade-sap/skills/sap-abap-testing"
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ {
43
+ writer: "knowledge",
44
+ config: {
45
+ sources: [
46
+ {
47
+ name: "sap-abap-docs",
48
+ origin: "https://your-serialized-version-of-abap-docs.git",
49
+ description: "Official SAP ABAP Cloud development guide"
50
+ }
51
+ ]
52
+ }
53
+ }
54
+ ],
55
+ docsets: [
56
+ {
57
+ id: "sap-btp-docs",
58
+ label: "SAP BTP",
59
+ origin: "https://your-serialized-version-of-btp-docs.git",
60
+ description: "SAP Business Technology Platform documentation"
61
+ }
62
+ ]
63
+ }
64
+ ]
65
+ }
66
+ };
@@ -0,0 +1,97 @@
1
+ # ADR 0002: Type Safety Strategy for Extension File Loading
2
+
3
+ ## Status
4
+
5
+ Proposed
6
+
7
+ ## Context
8
+
9
+ ADE is being made extensible: consumers who fork the repository or use it as an upstream
10
+ can place an `ade.extensions.mjs` (or `.js`, `.ts`) file in their project root to contribute
11
+ new catalog options, facets, provision writers, and harness writers without modifying
12
+ upstream files.
13
+
14
+ The CLI loads this file at runtime via dynamic `import()`. This creates a type safety gap:
15
+
16
+ - `import()` returns `Promise<unknown>`, so the loaded module has no compile-time shape
17
+ guarantee on the CLI side.
18
+ - Consumers writing `.mjs`/`.js` extension files have no TypeScript compiler checking their
19
+ exported object against the `AdeExtensions` interface.
20
+ - Shape errors (wrong property name, wrong recipe format, missing required field) would
21
+ surface as confusing runtime failures deep inside `resolve()` or a writer, not at the
22
+ point of authoring the extension.
23
+
24
+ Three levels of type safety are available:
25
+
26
+ **Level 1 — JSDoc `@type` annotation (authoring-time, opt-in)**
27
+ The consumer annotates their JS extension file with
28
+ `/** @type {import('@codemcp/ade-core').AdeExtensions} */`.
29
+ This provides IDE autocompletion and type hints in editors with JSDoc awareness (VS Code).
30
+ No build step. No CLI-side guarantee — the annotation is advisory only and silently ignored
31
+ if the consumer doesn't use it.
32
+
33
+ **Level 2 — Runtime Zod validation (load-time, mandatory)**
34
+ The CLI validates the loaded module against a Zod schema derived from `AdeExtensions`
35
+ immediately after import. Rejects invalid extensions with a structured, actionable error
36
+ message before any catalog or registry mutation happens.
37
+ No authoring-time feedback, but errors surface at `ade setup` time rather than
38
+ mid-resolution.
39
+
40
+ **Level 3 — TypeScript extension files via `jiti` (authoring-time, opt-in)**
41
+ The CLI's extension loader also accepts `ade.extensions.ts`. Loading it requires an
42
+ in-process TypeScript runner. `jiti` (by the Nuxt/unjs team) is the established solution:
43
+ it strips types at load time using `oxc-transform` (zero native binaries, fast, ESM-native).
44
+ Consumers writing `.ts` extension files get full TypeScript compiler checking and IDE
45
+ support. `jiti` is already used by Vite, Nuxt, and most of the unjs ecosystem.
46
+
47
+ These levels are not mutually exclusive. The fork scenario (consumer edits source TypeScript
48
+ directly in a forked CLI) already has full compile-time safety through the TypeScript
49
+ compiler — no additional mechanism needed there.
50
+
51
+ ## Decision
52
+
53
+ We will implement **Level 2 (Zod runtime validation) combined with Level 3 (`.ts` support
54
+ via `jiti`)**, and export the `AdeExtensions` type from `@codemcp/ade-core` to enable
55
+ Level 1 as a zero-cost baseline for JS consumers.
56
+
57
+ Concretely:
58
+
59
+ 1. `AdeExtensions` is defined as a TypeScript interface in `@codemcp/ade-core` and exported
60
+ from its public index.
61
+
62
+ 2. A corresponding `AdeExtensionsSchema` Zod schema is defined alongside the interface.
63
+ The CLI's `loadExtensions(projectRoot)` function validates every loaded extension object
64
+ against this schema and throws a structured error if validation fails.
65
+
66
+ 3. The extension loader searches for files in this order:
67
+ `ade.extensions.ts` → `ade.extensions.mjs` → `ade.extensions.js`
68
+ The first match is loaded. `.ts` files are loaded via `jiti`; `.mjs`/`.js` files via
69
+ native `import()`.
70
+
71
+ 4. `jiti` is added as a production dependency of `@codemcp/ade-cli`.
72
+
73
+ ## Consequences
74
+
75
+ **Easier:**
76
+
77
+ - Consumers writing `ade.extensions.ts` get full IDE type checking and compile-time errors
78
+ — the same authoring experience as editing the upstream source directly.
79
+ - All consumers (JS and TS) get clear, structured error messages at `ade setup` time if
80
+ their extension file is malformed, rather than cryptic failures during resolution.
81
+ - The `AdeExtensions` type and JSDoc `@type` path give JS consumers a zero-friction
82
+ upgrade path toward type safety without requiring a build step.
83
+ - The fork scenario (editing CLI TypeScript source directly) retains full compile-time
84
+ safety with no additional tooling.
85
+
86
+ **More difficult / trade-offs:**
87
+
88
+ - Adding `jiti` as a dependency introduces a transitive dependency surface (~400 kB
89
+ unpacked, no native binaries). This is a deliberate trade-off accepted in exchange for
90
+ `.ts` extension support.
91
+ - Zod must be kept as a runtime dependency of `@codemcp/ade-core` (it already is, or will
92
+ be added). The `AdeExtensionsSchema` must be kept in sync with the `AdeExtensions`
93
+ interface — a dual-maintenance surface. A build-time `zod-to-ts` or `ts-to-zod` step
94
+ could eliminate this in the future if drift becomes a problem.
95
+ - Dynamic loading of arbitrary user files (via `import()` or `jiti`) means the CLI cannot
96
+ be fully type-checked end-to-end at its own build time. The Zod boundary is the explicit
97
+ trust boundary between upstream-typed code and user-supplied code.