@codemcp/ade 0.7.0 → 0.8.0

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 (38) hide show
  1. package/.beads/issues.jsonl +26 -0
  2. package/.beads/last-touched +1 -1
  3. package/.vibe/beads-state-ade-fix-docset-writing-37fuoj.json +29 -0
  4. package/.vibe/development-plan-fix-docset-writing.md +77 -0
  5. package/.vibe/docs/architecture.md +201 -0
  6. package/.vibe/docs/design.md +179 -0
  7. package/.vibe/docs/requirements.md +17 -0
  8. package/ade.extensions.mjs +13 -15
  9. package/docs/CLI-PRD.md +38 -40
  10. package/docs/CLI-design.md +47 -57
  11. package/docs/guide/extensions.md +6 -14
  12. package/package.json +1 -1
  13. package/packages/cli/dist/index.js +15202 -5579
  14. package/packages/cli/package.json +1 -1
  15. package/packages/cli/src/commands/conventions.integration.spec.ts +29 -4
  16. package/packages/cli/src/commands/extensions.integration.spec.ts +26 -4
  17. package/packages/cli/src/commands/install.ts +2 -0
  18. package/packages/cli/src/commands/knowledge-docset.integration.spec.ts +179 -0
  19. package/packages/cli/src/commands/knowledge.integration.spec.ts +24 -36
  20. package/packages/cli/src/commands/setup.spec.ts +1 -101
  21. package/packages/cli/src/commands/setup.ts +23 -36
  22. package/packages/cli/src/knowledge-installer.spec.ts +43 -3
  23. package/packages/cli/src/knowledge-installer.ts +12 -9
  24. package/packages/core/package.json +1 -1
  25. package/packages/core/src/catalog/catalog.spec.ts +75 -43
  26. package/packages/core/src/catalog/facets/architecture.ts +89 -58
  27. package/packages/core/src/catalog/facets/practices.ts +9 -8
  28. package/packages/core/src/index.ts +4 -4
  29. package/packages/core/src/registry.spec.ts +1 -1
  30. package/packages/core/src/registry.ts +2 -2
  31. package/packages/core/src/resolver.spec.ts +61 -154
  32. package/packages/core/src/resolver.ts +0 -54
  33. package/packages/core/src/types.ts +5 -10
  34. package/packages/core/src/writers/docset.spec.ts +40 -0
  35. package/packages/core/src/writers/docset.ts +24 -0
  36. package/packages/harnesses/package.json +1 -1
  37. package/packages/core/src/writers/knowledge.spec.ts +0 -26
  38. package/packages/core/src/writers/knowledge.ts +0 -15
@@ -6,6 +6,32 @@
6
6
  {"id":"ade-1.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-18T08:27:27.697356+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-18T08:27:27.697356+01:00","dependencies":[{"issue_id":"ade-1.3","depends_on_id":"ade-1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-1.3","depends_on_id":"ade-1.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
7
7
  {"id":"ade-1.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-18T08:27:27.865128+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-18T08:27:27.865128+01:00","dependencies":[{"issue_id":"ade-1.4","depends_on_id":"ade-1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-1.4","depends_on_id":"ade-1.3","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
8
8
  {"id":"ade-1.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-18T08:27:28.031667+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-18T08:27:28.031667+01:00","dependencies":[{"issue_id":"ade-1.5","depends_on_id":"ade-1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-1.5","depends_on_id":"ade-1.4","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
9
+ {"id":"ade-10","title":"ade: bugfix (development-plan-fix-docset-writing.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-20T14:32:23.763416+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T14:32:23.763416+01:00"}
10
+ {"id":"ade-10.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-20T14:32:23.906213+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T14:32:23.906213+01:00","dependencies":[{"issue_id":"ade-10.1","depends_on_id":"ade-10","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
11
+ {"id":"ade-10.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-20T14:32:24.062362+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T14:32:24.062362+01:00","dependencies":[{"issue_id":"ade-10.2","depends_on_id":"ade-10","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-10.2","depends_on_id":"ade-10.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
12
+ {"id":"ade-10.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-20T14:32:24.211424+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T14:32:24.211424+01:00","dependencies":[{"issue_id":"ade-10.3","depends_on_id":"ade-10","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-10.3","depends_on_id":"ade-10.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
13
+ {"id":"ade-10.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-20T14:32:24.357+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T14:32:24.357+01:00","dependencies":[{"issue_id":"ade-10.4","depends_on_id":"ade-10","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-10.4","depends_on_id":"ade-10.3","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
14
+ {"id":"ade-10.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-20T14:32:24.515977+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T14:32:24.515977+01:00","dependencies":[{"issue_id":"ade-10.5","depends_on_id":"ade-10","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-10.5","depends_on_id":"ade-10.4","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
15
+ {"id":"ade-11","title":"ade: epcc (development-plan-fix-docset-writing.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-20T15:24:52.604251+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:05:42.784077+01:00","closed_at":"2026-03-20T16:05:42.784077+01:00","close_reason":"Closed"}
16
+ {"id":"ade-11.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-20T15:24:52.757158+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:26.864081+01:00","closed_at":"2026-03-20T16:01:26.864081+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.1","depends_on_id":"ade-11","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
17
+ {"id":"ade-11.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-20T15:24:52.917633+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:26.996449+01:00","closed_at":"2026-03-20T16:01:26.996449+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.2","depends_on_id":"ade-11","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-11.2","depends_on_id":"ade-11.1","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
18
+ {"id":"ade-11.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-20T15:24:53.084958+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:27.09839+01:00","closed_at":"2026-03-20T16:01:27.09839+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3","depends_on_id":"ade-11","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-11.3","depends_on_id":"ade-11.2","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
19
+ {"id":"ade-11.3.1","title":"types.ts: remove Option.docsets, excluded_docsets from UserConfig, add docset to ProvisionWriter","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.105878+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:13.66361+01:00","closed_at":"2026-03-20T16:01:13.66361+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.1","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
20
+ {"id":"ade-11.3.10","title":"catalog/catalog.spec.ts: replace .docsets assertions with recipe-entry assertions","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:49.43139+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.697048+01:00","closed_at":"2026-03-20T16:01:14.697048+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.10","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
21
+ {"id":"ade-11.3.11","title":"cli/setup.ts: remove docset confirmation multiselect block","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:49.575948+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.807776+01:00","closed_at":"2026-03-20T16:01:14.807776+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.11","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
22
+ {"id":"ade-11.3.12","title":"cli/setup.spec.ts: remove docset-related tests","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:49.720793+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.914569+01:00","closed_at":"2026-03-20T16:01:14.914569+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.12","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
23
+ {"id":"ade-11.3.13","title":"cli/knowledge.integration.spec.ts: remove excluded_docsets test","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:49.87583+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:15.018168+01:00","closed_at":"2026-03-20T16:01:15.018168+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.13","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
24
+ {"id":"ade-11.3.14","title":"cli/conventions.integration.spec.ts: remove docset multiselect mock calls","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:50.015271+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:15.119845+01:00","closed_at":"2026-03-20T16:01:15.119845+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.14","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
25
+ {"id":"ade-11.3.15","title":"Delete dead files: writers/knowledge.ts and knowledge.spec.ts","status":"closed","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:50.151331+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:13.53949+01:00","closed_at":"2026-03-20T16:01:13.53949+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.15","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
26
+ {"id":"ade-11.3.2","title":"writers/docset.ts: new docset provision writer","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.271995+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:13.783381+01:00","closed_at":"2026-03-20T16:01:13.783381+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.2","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
27
+ {"id":"ade-11.3.3","title":"writers/docset.spec.ts: unit tests for docset writer","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.410045+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:13.883732+01:00","closed_at":"2026-03-20T16:01:13.883732+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.3","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
28
+ {"id":"ade-11.3.4","title":"registry.ts: register docsetWriter","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.546387+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:13.996487+01:00","closed_at":"2026-03-20T16:01:13.996487+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.4","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
29
+ {"id":"ade-11.3.5","title":"index.ts: export docsetWriter, remove collectDocsets export","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.680198+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.103166+01:00","closed_at":"2026-03-20T16:01:14.103166+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.5","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
30
+ {"id":"ade-11.3.6","title":"resolver.ts: remove docset-collection loop, exclusion filtering, collectDocsets()","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.821344+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.209469+01:00","closed_at":"2026-03-20T16:01:14.209469+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.6","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
31
+ {"id":"ade-11.3.7","title":"resolver.spec.ts: update docsets fixtures to recipe entries, remove excluded_docsets tests","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:48.957283+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.316194+01:00","closed_at":"2026-03-20T16:01:14.316194+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.7","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
32
+ {"id":"ade-11.3.8","title":"catalog/facets/architecture.ts: replace docsets[] with recipe entries (3 options)","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:49.150947+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.449139+01:00","closed_at":"2026-03-20T16:01:14.449139+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.8","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
33
+ {"id":"ade-11.3.9","title":"catalog/facets/practices.ts: replace docsets[] with recipe entry (1 option)","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-20T15:45:49.294147+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:01:14.582911+01:00","closed_at":"2026-03-20T16:01:14.582911+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.3.9","depends_on_id":"ade-11.3","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
34
+ {"id":"ade-11.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-20T15:24:53.248593+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-20T16:05:42.649754+01:00","closed_at":"2026-03-20T16:05:42.649754+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-11.4","depends_on_id":"ade-11","type":"parent-child","created_at":"0001-01-01T00:00:00Z"},{"issue_id":"ade-11.4","depends_on_id":"ade-11.3","type":"blocks","created_at":"0001-01-01T00:00:00Z"}]}
9
35
  {"id":"ade-2","title":"ade: epcc (development-plan-autonomy-facet.md)","description":"Responsible vibe engineering session using epcc workflow for ade","status":"open","priority":2,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-18T08:42:24.649306+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-18T08:42:24.649306+01:00"}
10
36
  {"id":"ade-2.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":"open","priority":3,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-18T08:42:24.818903+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-18T08:42:24.818903+01:00","dependencies":[{"issue_id":"ade-2.1","depends_on_id":"ade-2","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
11
37
  {"id":"ade-2.1.1","title":"Review existing behavior-oriented facets and catalog tests","status":"closed","priority":1,"issue_type":"task","owner":"github@beimir.net","created_at":"2026-03-18T08:46:07.923572+01:00","created_by":"Oliver Jägle","updated_at":"2026-03-18T08:46:37.327782+01:00","closed_at":"2026-03-18T08:46:37.327782+01:00","close_reason":"Closed","dependencies":[{"issue_id":"ade-2.1.1","depends_on_id":"ade-2.1","type":"parent-child","created_at":"0001-01-01T00:00:00Z"}]}
@@ -1 +1 @@
1
- ade-9.3.6
1
+ ade-11.3.15
@@ -0,0 +1,29 @@
1
+ {
2
+ "conversationId": "ade-fix-docset-writing-37fuoj",
3
+ "projectPath": "/Users/oliverjaegle/projects/privat/codemcp/ade",
4
+ "epicId": "ade-11",
5
+ "phaseTasks": [
6
+ {
7
+ "phaseId": "explore",
8
+ "phaseName": "Explore",
9
+ "taskId": "ade-11.1"
10
+ },
11
+ {
12
+ "phaseId": "plan",
13
+ "phaseName": "Plan",
14
+ "taskId": "ade-11.2"
15
+ },
16
+ {
17
+ "phaseId": "code",
18
+ "phaseName": "Code",
19
+ "taskId": "ade-11.3"
20
+ },
21
+ {
22
+ "phaseId": "commit",
23
+ "phaseName": "Commit",
24
+ "taskId": "ade-11.4"
25
+ }
26
+ ],
27
+ "createdAt": "2026-03-20T14:24:53.678Z",
28
+ "updatedAt": "2026-03-20T14:24:53.678Z"
29
+ }
@@ -0,0 +1,77 @@
1
+ # Development Plan: ade (fix-docset-writing branch)
2
+
3
+ *Generated on 2026-03-20 by Vibe Feature MCP*
4
+ *Workflow: [epcc](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/epcc)*
5
+
6
+ ## Goal
7
+
8
+ Refactor: collapse `option.docsets[]` into a `docset` provision writer in the recipe.
9
+
10
+ **Background:** Currently `Option` has two separate mechanisms for contributing to `knowledge_sources`:
11
+ 1. `recipe[]` entries with provision writers (skills, git-hooks, instruction, etc.)
12
+ 2. A separate `docsets?: DocsetDef[]` sibling field — with its own confirmation UI, per-item exclusion (`excluded_docsets`), and `collectDocsets()` helper
13
+
14
+ The `docsets` field was kept separate to support per-docset user confirmation/exclusion. But this is inconsistent with how skills work — skills are presented as a bulk "install N skills?" prompt, not a per-skill multiselect. Docsets should follow the same pattern: a `docset` provision writer in the recipe that contributes to `knowledge_sources`, with a bulk defer prompt (matching skills), and no per-item exclusion UI.
15
+
16
+ **Target design:**
17
+ - `Option.docsets?: DocsetDef[]` → removed
18
+ - new `docset` provision writer → pushes a `KnowledgeSource` to `knowledge_sources[]`
19
+ - confirmation/exclusion multiselect in `setup.ts` → removed
20
+ - `excluded_docsets` in `UserConfig` → removed
21
+ - `collectDocsets()` → removed
22
+
23
+ ## Explore
24
+ <!-- beads-phase-id: ade-11.1 -->
25
+ ### Tasks
26
+
27
+ *Tasks managed via `bd` CLI*
28
+
29
+ ## Plan
30
+ <!-- beads-phase-id: ade-11.2 -->
31
+
32
+ ### Phase Entrance Criteria
33
+ - [ ] All usages of `docsets`, `collectDocsets`, `excluded_docsets` are catalogued
34
+ - [ ] Scope and approach are clearly understood
35
+
36
+ ### Tasks
37
+
38
+ *Tasks managed via `bd` CLI*
39
+
40
+ ## Code
41
+ <!-- beads-phase-id: ade-11.3 -->
42
+
43
+ ### Phase Entrance Criteria
44
+ - [ ] Plan is complete and agreed
45
+ - [ ] New `docset` writer shape is defined
46
+ - [ ] All affected files are identified
47
+
48
+ ### Tasks
49
+
50
+ *Tasks managed via `bd` CLI*
51
+
52
+ ## Commit
53
+ <!-- beads-phase-id: ade-11.4 -->
54
+
55
+ ### Phase Entrance Criteria
56
+ - [ ] All tests pass
57
+ - [ ] No references to `docsets`, `collectDocsets`, or `excluded_docsets` remain in production code
58
+
59
+ ### Tasks
60
+ - [ ] 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.
61
+
62
+ *Tasks managed via `bd` CLI*
63
+
64
+ ## Key Decisions
65
+
66
+ - `docsets` as a sibling field on `Option` exists solely to support per-item confirmation/exclusion — a UI concern, not a data model concern
67
+ - Skills set the right precedent: bulk defer prompt, no per-item opt-out
68
+ - The `docset` provision writer config shape should match `DocsetDef`: `{ id, label, origin, description }`
69
+ - Mapping: writer config `id` → `KnowledgeSource.name`, `description` → `KnowledgeSource.description`, `origin` → `KnowledgeSource.origin`
70
+
71
+ ## Notes
72
+
73
+ - Previous WIP commit on `fix-docset-writing`: removed `knowledge` writer, wired `installKnowledge` into setup/install
74
+ - The `knowledge.ts` writer file still exists on disk (dead code) — can be deleted as part of this refactor
75
+
76
+ ---
77
+ *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,201 @@
1
+ # ADE — System Architecture (C4 Model)
2
+
3
+ ## 1. System Context (C4 Level 1)
4
+
5
+ ### System Overview
6
+
7
+ ADE (Agentic Development Environment) is a CLI tool that lets engineering teams declare _what_ their project needs for agentic development — workflow conventions, skills, knowledge sources, tools — and generates the correct agent-specific configuration files for whichever coding agent they use. It bridges the gap between a team's abstract preferences and the per-agent config formats each AI coding assistant requires.
8
+
9
+ ### Users and Personas
10
+
11
+ - **Individual developer**: Runs `ade setup` once to configure a project, then `ade install` on subsequent machines or CI environments to reproduce the setup.
12
+ - **Tech lead / platform team**: Authors a shared `ade.extensions.mjs` that encodes org-specific conventions (custom skills, internal docsets, proprietary harnesses) and distributes it via a template repository.
13
+ - **CI/CD pipeline**: Calls `ade install` to ensure a reproducible agent environment before agentic tasks run.
14
+
15
+ ### External Systems
16
+
17
+ - **`@codemcp/skills`**: Manages SKILL.md files and the skills lock file. ADE calls its programmatic API (`runAdd`) to install skills into the project.
18
+ - **`@codemcp/knowledge`**: Manages `.knowledge/config.yaml` and docset artifacts. ADE calls `createDocset` + `initDocset` to register and download knowledge sources.
19
+ - **`@codemcp/workflows-server`** (and other MCP servers): Runtime servers registered as MCP server entries in the generated agent config. ADE writes the config; it does not start or manage these servers.
20
+ - **Coding agents** (Claude Code, OpenCode, Copilot, Cursor, Kiro, etc.): Consumers of ADE's generated config files. Each has its own format; ADE's harness writers know the details.
21
+ - **Skills server** (e.g. `mrsimpson/skills-coding`): External source for skill definitions referenced in catalog options.
22
+
23
+ ### System Boundaries
24
+
25
+ - **Inside ADE**: Catalog, resolver, provision writers, harness writers, CLI TUI, lock file management, skills installer, knowledge installer.
26
+ - **Outside ADE**: Runtime MCP servers, agent execution, skill content authoring, docset content management, the agents themselves.
27
+
28
+ ### Context Diagram
29
+
30
+ ```
31
+ ┌─────────────────────────────────────────────────────────┐
32
+ │ Developer │
33
+ └─────────────────────────┬───────────────────────────────┘
34
+ │ ade setup / ade install
35
+ ┌─────────────────────────▼───────────────────────────────┐
36
+ │ ADE CLI (@codemcp/ade) │
37
+ │ Interactive TUI + resolver + file generators │
38
+ └──────┬──────────────────┬──────────────────┬────────────┘
39
+ │ programmatic API │ │ writes config files
40
+ ▼ ▼ ▼
41
+ @codemcp/skills @codemcp/knowledge Agent config files
42
+ (skills lock, (.knowledge/ (AGENTS.md,
43
+ SKILL.md files) config.yaml, .mcp.json,
44
+ docset artifacts) opencode.json, …)
45
+ ```
46
+
47
+ ---
48
+
49
+ ## 2. Container Architecture (C4 Level 2)
50
+
51
+ ### Containers
52
+
53
+ #### `@codemcp/ade-core` (`packages/core`)
54
+
55
+ - **Technology**: TypeScript, pure functions, no I/O except config file reads/writes
56
+ - **Responsibilities**: All types, catalog definitions, resolution logic, provision writers, writer registry
57
+ - **Interfaces**: Public TypeScript API (`index.ts`) — exported types, `resolve()`, `createDefaultRegistry()`, `mergeExtensions()`, catalog accessors, config read/write utilities
58
+ - **Data storage**: None at runtime; reads/writes `config.yaml` and `config.lock.yaml` via helper functions
59
+
60
+ #### `@codemcp/ade-cli` (`packages/cli`)
61
+
62
+ - **Technology**: TypeScript, `@clack/prompts` for TUI, `tsup` bundle
63
+ - **Responsibilities**: Argument parsing, interactive TUI, extensions loading, skills installation, knowledge installation, command routing
64
+ - **Interfaces**: CLI binary (`ade setup [dir]`, `ade install [dir]`); programmatic entry points `runSetup()` and `runInstall()` (used in tests)
65
+ - **Data storage**: None; delegates to core for file I/O
66
+
67
+ #### `@codemcp/ade-harnesses` (`packages/harnesses`)
68
+
69
+ - **Technology**: TypeScript
70
+ - **Responsibilities**: Per-agent config file writers (AGENTS.md, .mcp.json, opencode.json, .kiro/, etc.)
71
+ - **Interfaces**: `allHarnessWriters`, `getHarnessWriter()`, `buildHarnessWriters()`, `installSkills()`, `writeInlineSkills()`
72
+ - **Data storage**: Writes agent-specific config files to the project root
73
+
74
+ ### Container Interactions
75
+
76
+ ```
77
+ ade setup/install
78
+
79
+ ├─► loadExtensions() [cli → disk: ade.extensions.mjs]
80
+ ├─► mergeExtensions() [cli → core]
81
+ ├─► resolve() [cli → core: UserConfig + Catalog → LogicalConfig]
82
+ ├─► writeLockFile() [cli → core → disk: config.lock.yaml]
83
+ ├─► harness.install() [cli → harnesses → disk: agent config files]
84
+ ├─► installSkills() [cli → harnesses → @codemcp/skills]
85
+ └─► installKnowledge() [cli → @codemcp/knowledge API]
86
+ ```
87
+
88
+ ### Deployment
89
+
90
+ ADE is a developer tool — it runs locally (`npx @codemcp/ade`) or in CI. There is no persistent service. The generated output files are checked into the project repository.
91
+
92
+ ---
93
+
94
+ ## 3. Component Architecture (C4 Level 3)
95
+
96
+ ### `@codemcp/ade-core` Components
97
+
98
+ #### Catalog
99
+
100
+ - **Responsibilities**: Declares all built-in facets and options as TypeScript objects; provides `getDefaultCatalog()`, `mergeExtensions()`, `sortFacets()`, `getVisibleOptions()`
101
+ - **Key files**: `catalog/index.ts`, `catalog/facets/{process,architecture,practices,backpressure,autonomy}.ts`
102
+ - **Design pattern**: Static data objects; no runtime state
103
+
104
+ #### Resolver
105
+
106
+ - **Responsibilities**: Expands `UserConfig` choices against the `Catalog` using the `WriterRegistry`; produces `LogicalConfig`; deduplicates MCP servers and skills by key; auto-adds `@codemcp/knowledge-server` when `knowledge_sources` are non-empty
107
+ - **Key files**: `resolver.ts`
108
+ - **Design pattern**: Pure function `resolve(userConfig, catalog, registry): Promise<LogicalConfig>`
109
+
110
+ #### Writer Registry
111
+
112
+ - **Responsibilities**: Maps writer IDs to `ProvisionWriterDef` instances; `createDefaultRegistry()` pre-registers all built-in writers; open for runtime extension
113
+ - **Key files**: `registry.ts`
114
+ - **Design pattern**: `Map`-based registry; open/closed principle — new writers added without modifying core
115
+
116
+ #### Provision Writers (built-in)
117
+
118
+ | Writer | File | Output |
119
+ |---|---|---|
120
+ | `workflows` | `writers/workflows.ts` | `mcp_servers[]` entry |
121
+ | `skills` | `writers/skills.ts` | `skills[]` entries |
122
+ | `docset` | `writers/docset.ts` | `knowledge_sources[]` entry |
123
+ | `instruction` | `writers/instruction.ts` | `instructions[]` entry |
124
+ | `git-hooks` | `writers/git-hooks.ts` | `git_hooks[]` entries |
125
+ | `permission-policy` | `writers/permission-policy.ts` | `permission_policy` |
126
+ | `setup-note` | `writers/setup-note.ts` | `setup_notes[]` entry |
127
+ | `mcp-server` | `writers/mcp-server.ts` | `mcp_servers[]` entry |
128
+
129
+ Each writer receives `Record<string, unknown>` config and narrows internally; the registry contract stays generic.
130
+
131
+ #### Types
132
+
133
+ - **Responsibilities**: Single source of truth for all shared interfaces — `Catalog`, `Facet`, `Option`, `Provision`, `LogicalConfig`, `KnowledgeSource`, `DocsetPreset`, `SkillDefinition`, `UserConfig`, `LockFile`, `WriterRegistry`, `AdeExtensions`, and their Zod validation schemas
134
+ - **Key file**: `types.ts`
135
+
136
+ ### `@codemcp/ade-cli` Components
137
+
138
+ #### Entry Point / Router (`index.ts`)
139
+
140
+ Parses `process.argv`, loads extensions, builds catalog and harness writers, delegates to `runSetup` or `runInstall`.
141
+
142
+ #### `runSetup` (`commands/setup.ts`)
143
+
144
+ Walks the user through the TUI facet-by-facet, resolves choices, writes `config.yaml` + `config.lock.yaml`, runs harness writers, installs skills and offers knowledge initialization.
145
+
146
+ #### `runInstall` (`commands/install.ts`)
147
+
148
+ Reads `config.lock.yaml`, runs harness writers, installs skills, and calls `installKnowledge` — no re-resolution.
149
+
150
+ #### Extensions Loader (`extensions.ts`)
151
+
152
+ Finds and loads `ade.extensions.{ts,mjs,js}` from the project root. Uses `jiti` for TypeScript files. Validates with `AdeExtensionsSchema`.
153
+
154
+ #### Knowledge Installer (`knowledge-installer.ts`)
155
+
156
+ Wraps `createDocset` + `initDocset` from `@codemcp/knowledge`. Handles "already exists" gracefully (proceeds to `initDocset`). Passes `preset` from `KnowledgeSource` (default: `"git-repo"`).
157
+
158
+ ---
159
+
160
+ ## 4. Architecture Decisions
161
+
162
+ ### Docsets as `docset` provision writer (not `Option.docsets[]`)
163
+
164
+ **Decision**: Documentation sources are declared as `{ writer: "docset", config: { id, label, origin, description, preset? } }` recipe entries, identical in structure to skills provisions.
165
+
166
+ **Rationale**: The old `Option.docsets[]` sibling field was a parallel mechanism that bypassed the writer registry, required a separate opt-out multiselect prompt, and introduced `excluded_docsets` in `UserConfig`. The writer model is already the right abstraction — using it for docsets makes the catalog uniform, removes per-item opt-out UX, and lets extensions contribute docsets with the same syntax as everything else.
167
+
168
+ **Consequences**: `DocsetDef`, `collectDocsets()`, and `excluded_docsets` removed. Setup prompt simplified to a single opt-in confirm.
169
+
170
+ ### Two-package split: `core` + `cli`
171
+
172
+ **Decision**: All types, logic, and writers live in `@codemcp/ade-core`. The CLI is a thin shell.
173
+
174
+ **Rationale**: Core can be imported programmatically (CI scripts, tests, extensions) without pulling in TUI dependencies. It also enables the harnesses package to depend on core without depending on the CLI.
175
+
176
+ ### `LogicalConfig` as the stable contract
177
+
178
+ **Decision**: Provision writers produce `Partial<LogicalConfig>`; harness writers consume `LogicalConfig`. Neither knows about the other.
179
+
180
+ **Rationale**: Decouples the catalog / resolution side from the file-generation side. Adding a new harness requires no changes to writers; adding a new writer requires no changes to harnesses.
181
+
182
+ ### Lock file is the install source of truth
183
+
184
+ **Decision**: `ade install` reads `config.lock.yaml` directly; it never re-resolves from `config.yaml`.
185
+
186
+ **Rationale**: Mirrors `npm ci` / `package-lock.json`. Makes installs deterministic and reviewable. `config.lock.yaml` is checked in, so CI produces exactly what was reviewed.
187
+
188
+ ### Open registry for extensibility
189
+
190
+ **Decision**: `WriterRegistry` is a `Map`-based runtime registry, not a discriminated union.
191
+
192
+ **Rationale**: A discriminated union is a closed set — adding a writer from an extension package would require modifying core. The registry is open: any package can register a writer before `resolve()` runs.
193
+
194
+ ---
195
+
196
+ ## 5. References
197
+
198
+ - Existing CLI design doc: `docs/CLI-design.md`
199
+ - Existing CLI PRD: `docs/CLI-PRD.md`
200
+ - Extensions guide: `docs/guide/extensions.md`
201
+ - Example extension: `ade.extensions.mjs`
@@ -0,0 +1,179 @@
1
+ <!--
2
+ DESIGN DOCUMENT TEMPLATE - TIERED BY PROJECT COMPLEXITY
3
+
4
+ PURPOSE: Document design principles, patterns, and standards that guide implementation.
5
+ NOTE: Technology stack decisions belong in the Architecture Document, not here.
6
+
7
+ PROJECT COMPLEXITY GUIDE:
8
+ 🚀 ESSENTIAL (Startup/MVP, 1-3 developers, <6 months): Sections 1-2 only
9
+ 🏢 CORE (Small team, 2-5 developers, 6-18 months): Sections 1-4
10
+ 🏗️ ADVANCED (Enterprise, 5+ developers, 18+ months): Sections 1-5
11
+ ⚡ SPECIALIZED (Mission-critical, high reliability): All sections + custom
12
+
13
+ WHAT TO INCLUDE:
14
+ ✅ Design principles and patterns
15
+ ✅ Naming conventions and standards
16
+ ✅ Component design approaches
17
+ ✅ Data modeling principles
18
+ ✅ Quality attribute design strategies
19
+ ❌ Technology stack choices (goes in Architecture doc)
20
+ ❌ Concrete class names or implementations
21
+ ❌ Code snippets or method signatures
22
+
23
+ START SMALL: Begin with Essential sections, add more as project matures.
24
+
25
+ IMPORTANT: DO NOT REMOVE THIS COMMENT HOW TO USE THE TEMPLATE!
26
+ -->
27
+
28
+ # ADE — Design Document
29
+
30
+ ## 1. Naming Conventions
31
+
32
+ ### Types and Interfaces
33
+
34
+ - **PascalCase** for all TypeScript interfaces, type aliases, and enums: `LogicalConfig`, `KnowledgeSource`, `DocsetPreset`, `ProvisionWriterDef`.
35
+ - Suffix `Def` for writer definition interfaces: `ProvisionWriterDef`, `AgentWriterDef`.
36
+ - Suffix `Schema` for Zod validation schemas: `AdeExtensionsSchema`, `OptionSchema`.
37
+ - Suffix `Writer` for instances of writers registered in the registry: `docsetWriter`, `skillsWriter`, `workflowsWriter`.
38
+ - Suffix `Facet` for exported catalog facet objects: `architectureFacet`, `practicesFacet`.
39
+
40
+ ### Functions
41
+
42
+ - **camelCase** throughout. Factory functions prefixed `create`: `createDefaultRegistry()`, `createRegistry()`. Reader/writer pairs prefixed `read`/`write`: `readLockFile()`, `writeLockFile()`. Accessor functions prefixed `get`: `getFacet()`, `getOption()`, `getProvisionWriter()`.
43
+ - CLI entry points prefixed `run`: `runSetup()`, `runInstall()`.
44
+
45
+ ### Files
46
+
47
+ - One primary export per file; file name matches the export name in kebab-case: `docset.ts` exports `docsetWriter`, `knowledge-installer.ts` exports `installKnowledge`.
48
+ - Test files co-located: `docset.ts` → `docset.spec.ts`. Integration tests suffixed `.integration.spec.ts`.
49
+
50
+ ### Writer IDs
51
+
52
+ - Kebab-case string IDs matching the file name: `"docset"`, `"git-hooks"`, `"permission-policy"`, `"setup-note"`.
53
+
54
+ ---
55
+
56
+ ## 2. Error Handling Design
57
+
58
+ ### Provision Writers
59
+
60
+ Writers throw on invalid config. The resolver does not catch writer errors — a bad catalog entry or extension config fails loudly at setup time, not silently at runtime.
61
+
62
+ ### Knowledge Installer
63
+
64
+ `createDocset` "already exists" errors are swallowed and execution falls through to `initDocset` (idempotency). All other `createDocset` errors and all `initDocset` errors are logged as warnings and skipped — one failing source does not block the rest.
65
+
66
+ ### Extensions Loading
67
+
68
+ `AdeExtensionsSchema.safeParse()` on loaded extension data. On failure, a descriptive error is thrown before any resolution runs: _"Invalid ade.extensions file at …"_.
69
+
70
+ ### Unknown Writer IDs
71
+
72
+ `resolve()` throws if a recipe provision references a writer ID not present in the registry. This is a catalog authoring error and should fail loudly.
73
+
74
+ ### TUI Cancellation
75
+
76
+ `clack.isCancel()` is checked after every prompt. On cancel, `clack.cancel()` is called and the function returns early (no partial writes).
77
+
78
+ ---
79
+
80
+ ## 3. Architecture Patterns & Principles
81
+
82
+ ### Registry Pattern for Open Extensibility
83
+
84
+ The `WriterRegistry` is a `Map`-based runtime dispatch table. New provision writers are registered with `registerProvisionWriter(registry, writerDef)` before `resolve()` runs. This keeps the system open for extension without modifying core — any package contributing via `ade.extensions.mjs` can register custom writers.
85
+
86
+ ### Pure Function Resolution
87
+
88
+ `resolve()` is a pure async function: `(UserConfig, Catalog, WriterRegistry) → LogicalConfig`. It has no side effects and no I/O. This makes it trivially testable and usable in non-CLI contexts.
89
+
90
+ ### Stable Interface Seam: `LogicalConfig`
91
+
92
+ All provision writers produce `Partial<LogicalConfig>`. All harness writers consume `LogicalConfig`. This seam is the only contract between the two sides — writers don't know about agents, agents don't know about writers.
93
+
94
+ ### Data-Driven Catalog
95
+
96
+ The catalog is plain TypeScript data (no classes, no inheritance). Facets and options are literal objects conforming to the `Facet` and `Option` interfaces. This makes the catalog easily serializable, diffable, and extensible via `mergeExtensions()`.
97
+
98
+ ### Opt-In Confirmation for Side Effects
99
+
100
+ Long-running or network-bound operations (skills installation, knowledge init) are never performed silently. The TUI asks the user with a `confirm` prompt (default: `false` for knowledge, `true` for skills). `ade install` performs these unconditionally since it is non-interactive and the lock file represents the user's prior decision.
101
+
102
+ ---
103
+
104
+ ## 4. Component Design Strategy
105
+
106
+ ### Component Boundary Principles
107
+
108
+ - **`core`** has zero runtime I/O except config file reads/writes. No TUI, no network, no process spawning.
109
+ - **`cli`** is the I/O layer: TUI prompts, extension file loading, subprocess/API calls to `@codemcp/skills` and `@codemcp/knowledge`.
110
+ - **`harnesses`** knows all agent config formats but nothing about how selections were made.
111
+
112
+ ### Responsibility Assignment
113
+
114
+ Each provision writer is responsible for exactly one `LogicalConfig` field group. It receives an untyped `config` record and narrows internally — the registry contract stays generic while the implementation is specific.
115
+
116
+ ### Interface Design
117
+
118
+ Writers are `interface`-typed (open contracts), not `class`-based. This allows any object literal conforming to the interface to be registered — no inheritance required, no framework needed.
119
+
120
+ ### Dependency Direction
121
+
122
+ ```
123
+ cli → core ← harnesses
124
+ cli → harnesses
125
+ ```
126
+
127
+ `core` has no upward dependencies. `harnesses` depends on `core` for types. `cli` depends on both.
128
+
129
+ ---
130
+
131
+ ## 5. Data Design Approach
132
+
133
+ ### Two-File Config Model
134
+
135
+ - **`config.yaml`** (user-facing): stores `choices` and optional `custom` overrides. CLI-managed except the `custom` block. Checked into the repo as a team-shared declaration.
136
+ - **`config.lock.yaml`** (generated): stores the fully resolved `LogicalConfig` snapshot. Never hand-edited. The install source of truth — `ade install` reads this, never re-resolves.
137
+
138
+ ### LogicalConfig as Intermediate Representation
139
+
140
+ `LogicalConfig` is agent-agnostic. It is the normalised representation of what the project needs, before it is translated into any agent's format. Fields are append-only lists (MCP servers, skills, knowledge sources, instructions) deduplicated by a stable key.
141
+
142
+ ### Deduplication Keys
143
+
144
+ - MCP servers: deduplicated by `ref`
145
+ - Skills: deduplicated by `name`
146
+ - Knowledge sources: deduplicated by `name`
147
+
148
+ ### `DocsetPreset` Typing
149
+
150
+ `KnowledgeSource.preset` uses the same literal union as `@codemcp/knowledge`'s `DocsetPreset` (`"git-repo" | "local-folder" | "archive"`), keeping the types aligned without re-exporting the dependency's internal types directly.
151
+
152
+ ---
153
+
154
+ ## 9. Extension and Evolution Strategy
155
+
156
+ ### Extension Points
157
+
158
+ 1. **`facetContributions`** — append options to existing facets (most common)
159
+ 2. **`facets`** — add entirely new facets
160
+ 3. **`provisionWriters`** — register custom writers for custom `config` shapes
161
+ 4. **`harnessWriters`** — add support for new coding agents
162
+
163
+ All four are declared in `ade.extensions.{mjs,ts}` in the project root. The CLI loads and validates this file before every `setup` or `install` run.
164
+
165
+ ### Versioning Strategy
166
+
167
+ The `config.lock.yaml` carries a `version: 1` field. Breaking changes to the lock file format increment this version. `ade install` can detect a stale lock file and prompt the user to re-run `ade setup`.
168
+
169
+ ### Catalog Evolution
170
+
171
+ Built-in catalog options can be updated in place. Extension options that `replaces` a built-in skill name override it at resolution time without modifying the upstream catalog.
172
+
173
+ ---
174
+
175
+ # Implementation Notes
176
+
177
+ - Tests import `runSetup` / `runInstall` directly; the CLI binary entry point is thin enough to not need its own tests.
178
+ - Integration tests mock `@clack/prompts` (TUI) and `@codemcp/knowledge` (network I/O) via `vi.mock`. All `confirm` mock return values must be set explicitly per test — `vi.clearAllMocks()` resets them to `undefined` (falsy).
179
+ - The `ProvisionWriter` union in `types.ts` is a type-level hint; the real runtime guard is the registry. Adding a new writer requires registering it in `createDefaultRegistry()` and the union.
@@ -0,0 +1,17 @@
1
+ # Requirements Placeholder
2
+
3
+ This is a placeholder document. The user has chosen not to maintain separate requirements documentation for this project.
4
+
5
+ ## INSTRUCTIONS FOR LLM
6
+
7
+ **DO NOT EDIT THIS FILE**
8
+
9
+ - Use the current development plan file to specify requirements for ongoing development
10
+ - Reference requirements from the plan file context when needed
11
+ - Focus requirements discussion in the plan file's "Goal" and relevant task sections
12
+ - When requirements clarification is needed, document them in the plan file rather than here
13
+ - This placeholder ensures the workflow variables work correctly while respecting the user's choice
14
+
15
+ ## User's Choice
16
+
17
+ The user has explicitly chosen not to use dedicated requirements documentation for this project. Please respect this decision and work with the plan file for requirements-related information.
@@ -40,24 +40,22 @@ export default {
40
40
  }
41
41
  },
42
42
  {
43
- writer: "knowledge",
43
+ writer: "docset",
44
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
- ]
45
+ id: "sap-btp-docs",
46
+ label: "SAP BTP",
47
+ origin: "https://your-serialized-version-of-btp-docs.git",
48
+ description: "SAP Business Technology Platform documentation"
52
49
  }
53
- }
54
- ],
55
- docsets: [
50
+ },
56
51
  {
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"
52
+ writer: "docset",
53
+ config: {
54
+ id: "sap-abap-docs",
55
+ label: "SAP ABAP Cloud",
56
+ origin: "https://your-serialized-version-of-abap-docs.git",
57
+ description: "Official SAP ABAP Cloud development guide"
58
+ }
61
59
  }
62
60
  ]
63
61
  }