@codemcp/ade 0.2.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 (150) hide show
  1. package/.ade/skills/adr-nygard/SKILL.md +45 -0
  2. package/.ade/skills/conventional-commits/SKILL.md +36 -0
  3. package/.ade/skills/tanstack-architecture/SKILL.md +25 -0
  4. package/.ade/skills/tanstack-code/SKILL.md +25 -0
  5. package/.ade/skills/tanstack-design/SKILL.md +24 -0
  6. package/.ade/skills/tanstack-testing/SKILL.md +24 -0
  7. package/.agentskills/skills/adr-nygard/SKILL.md +45 -0
  8. package/.agentskills/skills/commit/SKILL.md +20 -0
  9. package/.agentskills/skills/tdd/SKILL.md +10 -0
  10. package/.beads/README.md +85 -0
  11. package/.beads/config.yaml +63 -0
  12. package/.beads/interactions.jsonl +0 -0
  13. package/.beads/issues.jsonl +46 -0
  14. package/.beads/last-touched +1 -0
  15. package/.beads/metadata.json +4 -0
  16. package/.claude/settings.json +16 -0
  17. package/.claude/skills/extending-catalog/SKILL.md +41 -0
  18. package/.cursor/mcp.json +16 -0
  19. package/.cursor/rules/ade.mdc +10 -0
  20. package/.github/agents/ade.agent.md +28 -0
  21. package/.github/copilot-instructions.md +11 -0
  22. package/.github/workflows/pr.yml +38 -0
  23. package/.github/workflows/release.yml +124 -0
  24. package/.husky/post-checkout +2 -0
  25. package/.husky/post-merge +2 -0
  26. package/.husky/pre-commit +2 -0
  27. package/.husky/pre-push +8 -0
  28. package/.kiro/agents/ade.json +20 -0
  29. package/.kiro/settings/mcp.json +14 -0
  30. package/.knowledge/.prettierignore +1 -0
  31. package/.knowledge/config.yaml +9 -0
  32. package/.lintstagedrc.js +4 -0
  33. package/.mcp.json +20 -0
  34. package/.opencode/agents/ade.md +118 -0
  35. package/.prettierignore +2 -0
  36. package/.prettierrc.yaml +3 -0
  37. package/.vibe/beads-state-ade-autonomy-facet-46zodk.json +29 -0
  38. package/.vibe/beads-state-ade-fix-no-arch-selected-hvfiio.json +34 -0
  39. package/.vibe/development-plan-autonomy-facet.md +214 -0
  40. package/.vibe/development-plan-fix-no-arch-selected.md +103 -0
  41. package/.vscode/mcp.json +24 -0
  42. package/LICENSE +21 -0
  43. package/README.md +293 -0
  44. package/config.lock.yaml +118 -0
  45. package/config.yaml +10 -0
  46. package/docs/CLI-PRD.md +251 -0
  47. package/docs/CLI-design.md +646 -0
  48. package/docs/adrs/0001-tui-framework-selection.md +77 -0
  49. package/eslint.config.mjs +38 -0
  50. package/opencode.json +17 -0
  51. package/package.json +79 -0
  52. package/packages/cli/.prettierignore +1 -0
  53. package/packages/cli/dist/commands/install.js +39 -0
  54. package/packages/cli/dist/commands/setup.js +177 -0
  55. package/packages/cli/dist/index.js +43 -0
  56. package/packages/cli/dist/knowledge-installer.js +38 -0
  57. package/packages/cli/dist/version.js +1 -0
  58. package/packages/cli/eslint.config.mjs +40 -0
  59. package/packages/cli/nodemon.json +7 -0
  60. package/packages/cli/package.json +40 -0
  61. package/packages/cli/src/commands/conventions.integration.spec.ts +267 -0
  62. package/packages/cli/src/commands/install.integration.spec.ts +123 -0
  63. package/packages/cli/src/commands/install.spec.ts +169 -0
  64. package/packages/cli/src/commands/install.ts +63 -0
  65. package/packages/cli/src/commands/knowledge.integration.spec.ts +129 -0
  66. package/packages/cli/src/commands/setup.integration.spec.ts +148 -0
  67. package/packages/cli/src/commands/setup.spec.ts +442 -0
  68. package/packages/cli/src/commands/setup.ts +252 -0
  69. package/packages/cli/src/index.ts +52 -0
  70. package/packages/cli/src/knowledge-installer.spec.ts +111 -0
  71. package/packages/cli/src/knowledge-installer.ts +54 -0
  72. package/packages/cli/src/version.ts +1 -0
  73. package/packages/cli/tsconfig.build.json +8 -0
  74. package/packages/cli/tsconfig.json +10 -0
  75. package/packages/cli/tsconfig.vitest.json +7 -0
  76. package/packages/cli/vitest.config.ts +5 -0
  77. package/packages/core/.prettierignore +1 -0
  78. package/packages/core/eslint.config.mjs +40 -0
  79. package/packages/core/nodemon.json +7 -0
  80. package/packages/core/package.json +34 -0
  81. package/packages/core/src/catalog/catalog.spec.ts +570 -0
  82. package/packages/core/src/catalog/facets/architecture.ts +438 -0
  83. package/packages/core/src/catalog/facets/autonomy.ts +106 -0
  84. package/packages/core/src/catalog/facets/backpressure.ts +143 -0
  85. package/packages/core/src/catalog/facets/practices.ts +173 -0
  86. package/packages/core/src/catalog/facets/process.ts +50 -0
  87. package/packages/core/src/catalog/index.ts +93 -0
  88. package/packages/core/src/config.spec.ts +165 -0
  89. package/packages/core/src/config.ts +39 -0
  90. package/packages/core/src/index.ts +55 -0
  91. package/packages/core/src/registry.spec.ts +145 -0
  92. package/packages/core/src/registry.ts +70 -0
  93. package/packages/core/src/resolver.spec.ts +626 -0
  94. package/packages/core/src/resolver.ts +214 -0
  95. package/packages/core/src/types.ts +179 -0
  96. package/packages/core/src/writers/git-hooks.ts +9 -0
  97. package/packages/core/src/writers/instruction.spec.ts +42 -0
  98. package/packages/core/src/writers/instruction.ts +8 -0
  99. package/packages/core/src/writers/knowledge.spec.ts +26 -0
  100. package/packages/core/src/writers/knowledge.ts +15 -0
  101. package/packages/core/src/writers/permission-policy.ts +8 -0
  102. package/packages/core/src/writers/setup-note.ts +9 -0
  103. package/packages/core/src/writers/skills.spec.ts +109 -0
  104. package/packages/core/src/writers/skills.ts +9 -0
  105. package/packages/core/src/writers/workflows.spec.ts +72 -0
  106. package/packages/core/src/writers/workflows.ts +26 -0
  107. package/packages/core/tsconfig.build.json +8 -0
  108. package/packages/core/tsconfig.json +7 -0
  109. package/packages/core/tsconfig.vitest.json +7 -0
  110. package/packages/core/vitest.config.ts +5 -0
  111. package/packages/harnesses/.prettierignore +1 -0
  112. package/packages/harnesses/eslint.config.mjs +40 -0
  113. package/packages/harnesses/package.json +35 -0
  114. package/packages/harnesses/src/index.spec.ts +45 -0
  115. package/packages/harnesses/src/index.ts +47 -0
  116. package/packages/harnesses/src/permission-policy.ts +173 -0
  117. package/packages/harnesses/src/skills-installer.ts +54 -0
  118. package/packages/harnesses/src/types.ts +12 -0
  119. package/packages/harnesses/src/util.ts +221 -0
  120. package/packages/harnesses/src/writers/claude-code.spec.ts +320 -0
  121. package/packages/harnesses/src/writers/claude-code.ts +107 -0
  122. package/packages/harnesses/src/writers/cline.spec.ts +212 -0
  123. package/packages/harnesses/src/writers/cline.ts +24 -0
  124. package/packages/harnesses/src/writers/copilot.spec.ts +258 -0
  125. package/packages/harnesses/src/writers/copilot.ts +105 -0
  126. package/packages/harnesses/src/writers/cursor.spec.ts +219 -0
  127. package/packages/harnesses/src/writers/cursor.ts +95 -0
  128. package/packages/harnesses/src/writers/kiro.spec.ts +228 -0
  129. package/packages/harnesses/src/writers/kiro.ts +89 -0
  130. package/packages/harnesses/src/writers/opencode.spec.ts +258 -0
  131. package/packages/harnesses/src/writers/opencode.ts +67 -0
  132. package/packages/harnesses/src/writers/roo-code.spec.ts +197 -0
  133. package/packages/harnesses/src/writers/roo-code.ts +71 -0
  134. package/packages/harnesses/src/writers/universal.spec.ts +134 -0
  135. package/packages/harnesses/src/writers/universal.ts +84 -0
  136. package/packages/harnesses/src/writers/windsurf.spec.ts +178 -0
  137. package/packages/harnesses/src/writers/windsurf.ts +89 -0
  138. package/packages/harnesses/tsconfig.build.json +8 -0
  139. package/packages/harnesses/tsconfig.json +7 -0
  140. package/packages/harnesses/tsconfig.vitest.json +7 -0
  141. package/packages/harnesses/vitest.config.ts +5 -0
  142. package/pnpm-workspace.yaml +2 -0
  143. package/scripts/rename-packages.sh +23 -0
  144. package/skills-lock.json +20 -0
  145. package/tsconfig.base.json +25 -0
  146. package/tsconfig.build.json +7 -0
  147. package/tsconfig.json +13 -0
  148. package/turbo.json +47 -0
  149. package/vitest.config.ts +22 -0
  150. package/vitest.setup.ts +0 -0
@@ -0,0 +1,214 @@
1
+ # Development Plan: ade (autonomy-facet branch)
2
+
3
+ _Generated on 2026-03-18 by Vibe Feature MCP_
4
+ _Workflow: [epcc](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/epcc)_
5
+
6
+ ## Goal
7
+
8
+ Add a new `autonomy` catalog facet that models how much initiative and execution freedom the agent should have, and register it consistently with the existing ADE facet system.
9
+
10
+ ## Explore
11
+
12
+ <!-- beads-phase-id: ade-2.1 -->
13
+
14
+ ### Tasks
15
+
16
+ _Tasks managed via `bd` CLI_
17
+
18
+ ### Findings
19
+
20
+ - Existing facets live in `packages/core/src/catalog/facets/` and are registered in `packages/core/src/catalog/index.ts`.
21
+ - Facets can be single-select or multi-select and may depend on `architecture` when options vary by stack.
22
+ - Catalog behavior is covered by `packages/core/src/catalog/catalog.spec.ts`.
23
+
24
+ ## Plan
25
+
26
+ <!-- beads-phase-id: ade-2.2 -->
27
+
28
+ ### Phase Entrance Criteria
29
+
30
+ - [ ] The current catalog structure and facet conventions have been reviewed.
31
+ - [ ] The target role of the new `autonomy` facet is clear enough to choose `required`, `multiSelect`, and any `dependsOn` settings.
32
+ - [ ] The files and tests affected by the change have been identified.
33
+
34
+ ### Tasks
35
+
36
+ _Tasks managed via `bd` CLI_
37
+
38
+ ## Code
39
+
40
+ <!-- beads-phase-id: ade-2.3 -->
41
+
42
+ ### Phase Entrance Criteria
43
+
44
+ - [ ] The `autonomy` facet design is defined, including its option ids, labels, descriptions, and recipes.
45
+ - [ ] The registration changes in `catalog/index.ts` are identified.
46
+ - [ ] The necessary validation updates in `catalog.spec.ts` are identified.
47
+
48
+ ### Tasks
49
+
50
+ _Tasks managed via `bd` CLI_
51
+
52
+ ## Commit
53
+
54
+ <!-- beads-phase-id: ade-2.4 -->
55
+
56
+ ### Phase Entrance Criteria
57
+
58
+ - [ ] The new facet implementation is complete and wired into the default catalog.
59
+ - [ ] Relevant tests have been run and pass, or failures are understood and documented.
60
+ - [ ] The final user-facing impact of the new facet is summarized.
61
+
62
+ ### Tasks
63
+
64
+ _Tasks managed via `bd` CLI_
65
+
66
+ ## Key Decisions
67
+
68
+ _Important decisions will be documented here as they are made_
69
+
70
+ - Treat `autonomy` as a first-class facet rather than overloading `process` or `practices`, so agent initiative is configurable independently.
71
+ - Reuse existing provision writers for the first cut, with `instruction` as the most likely fit unless the user wants autonomy tied to skills or workflows.
72
+ - The clarified scope is to influence harness-writer permission output, not just instructions: built-in tools and MCP tools need a shared autonomy policy that each harness writer can translate.
73
+ - The clarified scope is to influence harness-writer permission output for built-in/basic operations only; MCP tool permissions will continue to flow from MCP provisioning.
74
+ - The autonomy modes should support three levels: rigid (ask), sensible defaults, and max autonomy (full allow, with sandbox-oriented guidance).
75
+ - Web access should remain on `ask` for all harnesses, even when broader autonomy settings are enabled.
76
+ - Recommended design: introduce a shared autonomy permission model in core and have each harness writer translate that model into its own config shape.
77
+ - Recommended design: introduce a shared autonomy permission model in core for built-in/basic operations and have each harness writer translate that model into its own config shape, while forwarding MCP tool permissions unchanged from MCP provisioning.
78
+ - When a harness cannot express the full shared policy, ADE should degrade conservatively rather than silently broadening permissions.
79
+ - The revised target policy shape should focus on built-in/basic operations rather than trying to re-model harness-specific MCP permissions.
80
+ - MCP permissions are explicitly out of scope for autonomy and must be forwarded from MCP provisioning rather than re-modeled in `permission_policy`.
81
+ - The next implementation pass should use an abstract capability model for built-in/basic operations and default unknown/unsupported capabilities to `ask`.
82
+ - Implement `autonomy` via a dedicated `permission-policy` provision writer so the catalog remains declarative while the resolver still has a built-in fallback for that writer in narrow test registries.
83
+ - Remove `PermissionPolicy.mcp` from the shared type so core autonomy models built-in/basic capabilities only; harnesses must forward MCP approvals from provisioning data instead.
84
+ - Implemented the core-facing autonomy contract as `permission_policy.capabilities`, using the abstract capability keys `read`, `edit_write`, `search_list`, `bash_safe`, `bash_unsafe`, `web`, and `task_agent`.
85
+ - The selected core profile mappings are: `rigid` = ask for every capability, `sensible-defaults` = allow `read`/`edit_write`/`search_list`/`bash_safe`/`task_agent` while keeping `bash_unsafe` and `web` on `ask`, and `max-autonomy` = allow everything except `web`, which remains `ask`.
86
+ - Removed MCP ownership from the shared autonomy model in core; harnesses must now derive MCP approvals exclusively from provisioned MCP server entries and their `allowedTools`.
87
+ - Claude Code should translate autonomy locally in its writer: only official built-in rule names go into `.claude/settings.json`, and only explicitly provisioned MCP tools are forwarded as `mcp__server__tool`.
88
+ - Kiro should be rewritten to use `.kiro/agents/ade.json` with documented built-in selectors (`read`, `write`, `shell`, `spec`) while forwarding MCP trust from provisioning into `.kiro/settings/mcp.json` via `autoApprove`; web stays omitted so approval remains required.
89
+ - Kiro custom agents are discovered from JSON files in `.kiro/agents/`, not Markdown files; the generated ADE agent must therefore be `.kiro/agents/ade.json` with `name`, `description`, `prompt`, and `tools` so `kiro-cli chat --agent ade` can resolve it.
90
+ - Copilot should translate autonomy only through documented `tools:` aliases, omit any capability that would still require approval (especially `web`), and forward MCP approvals exactly as `server/<ref>/*` or `server/<ref>/<tool>` based on provisioning.
91
+ - Cline should use the verified project-local MCP settings file name `cline_mcp_settings.json` instead of `.cline/mcp.json`, and autonomy must not invent agent-local permission semantics when only settings-level controls are documented.
92
+ - Windsurf should keep forwarding project-local MCP registration and `allowedTools` approvals through `.windsurf/mcp.json`, but built-in autonomy must degrade to clearly labeled advisory text in `.windsurfrules` until a verified committed Windsurf permission schema exists.
93
+ - Cursor should keep `.cursor/mcp.json` limited to documented MCP server registration and render autonomy only as an explicit non-enforcing note in `.cursor/rules/ade.mdc`, because no verified committed project-local built-in permission schema was found.
94
+
95
+ ## Notes
96
+
97
+ _Additional context and observations_
98
+
99
+ - `backpressure` is the closest existing pattern for a behavior-oriented facet.
100
+ - The product docs currently frame “runtime agent behavior” as a non-goal, so the autonomy facet should likely influence generated instructions rather than introduce runtime control mechanisms.
101
+ - No existing `autonomy` concept appears anywhere in the repository yet, so option names and exact behaviors still need to be defined.
102
+ - Current permission handling is fragmented:
103
+ - `McpServerEntry.allowedTools` exists for per-server MCP permissions.
104
+ - `claude-code` maps MCP permissions into `.claude/settings.json`.
105
+ - `cline`, `roo-code`, and `windsurf` map MCP permissions into `alwaysAllow`.
106
+ - `kiro` writes both `tools` and `allowedTools`, but only MCP tools are derived from `allowedTools`.
107
+ - `copilot` writes a `tools:` allowlist in agent frontmatter for built-in tools plus `server/*`.
108
+ - `opencode` writes built-in tool approval defaults in agent frontmatter, but currently does not derive MCP permissions from `allowedTools`.
109
+ - `cursor` and `universal` currently emit no explicit permission policy.
110
+ - This implies a new shared policy object is likely needed in `LogicalConfig`, with harness-specific translation and partial support where a harness cannot express the full policy.
111
+ - The user explicitly wants network/web access to stay approval-gated across the board; this constraint should shape the sensible-defaults and max-autonomy mappings for each harness.
112
+ - Design options considered:
113
+ - Option A: encode autonomy directly inside each harness writer with no shared core model. Rejected because it duplicates policy logic and makes the catalog option semantics drift by harness.
114
+ - Option B: add a shared permission policy to `LogicalConfig`, populate it from the new `autonomy` facet, and let harness writers render the nearest supported representation. Recommended because it keeps the policy centralized and testable.
115
+ - Recommended shared model shape:
116
+ - Built-in/basic capability categories should be modeled abstractly and independently of harness-specific tool names.
117
+ - The model should be expressive enough to represent `ask`, curated sensible defaults, and broad local allow while preserving `web` as `ask`.
118
+ - Existing per-server MCP permissions should remain owned by MCP provisioning and simply be forwarded by harness writers.
119
+ - Recommended abstract capability model:
120
+ - `read`
121
+ - `edit_write`
122
+ - `search_list`
123
+ - `bash_safe`
124
+ - `bash_unsafe`
125
+ - `web`
126
+ - `task_agent`
127
+ - Planned autonomy semantics:
128
+ - `rigid`: approval-gated operation for mutable or risky capabilities.
129
+ - `sensible-defaults`: allow a curated low-risk set of built-in/basic interactions, based on `SAMPLE_PERMISSIONS.md` and harness capabilities.
130
+ - `max-autonomy`: broad allow for supported local capabilities, but keep web/network access on `ask`.
131
+ - Per-harness implementation plan for the next agent:
132
+ - `claude-code`
133
+ - Built-in/basic permissions belong in `.claude/settings.json`.
134
+ - Use official Claude rule names such as `Read`, `Edit`, `Bash`, `Glob`, `Grep`, `WebFetch`, `WebSearch`, `TodoWrite`, and `Agent(...)`.
135
+ - Do **not** use invented strings like `MCP(workflows:*)`; forwarded MCP permissions must use Claude’s documented `mcp__server__tool` style only when provisioning provides them.
136
+ - Autonomy should map only built-in/basic capability decisions here; MCP forwarding remains separate.
137
+ - `copilot`
138
+ - Agent-level control is via `tools:` exposure only, not true `ask` / `allow` / `deny`.
139
+ - Use documented Copilot tool aliases such as `read`, `edit`, `search`, `execute`, `agent`, `web`, and `todo`, plus `server/*` for MCP tools.
140
+ - Plan: autonomy changes the built-in `tools:` allowlist only; unsupported `ask` semantics must be treated as a limitation and documented.
141
+ - MCP tools should be forwarded as `server/*` or `server/tool` from provisioning, not interpreted by autonomy.
142
+ - `opencode`
143
+ - Built-in/basic permissions belong in OpenCode’s documented `permission` config.
144
+ - Valid permission keys include `read`, `edit`, `glob`, `grep`, `list`, `bash`, `task`, `skill`, `lsp`, `todoread`, `todowrite`, `question`, `webfetch`, `websearch`, `codesearch`, `external_directory`, and `doom_loop`.
145
+ - `sensible-defaults` should be derived from `SAMPLE_PERMISSIONS.md`, translated into OpenCode’s schema, with the explicit override that `webfetch`, `websearch`, and `codesearch` stay `ask`.
146
+ - Re-check whether the ADE agent should carry agent-local `permission` versus project-level `opencode.json.permission`; user feedback suggests the agent-local location matters.
147
+ - `kiro`
148
+ - Current assumptions need replacement; research indicates Kiro agents are Markdown-based and use selectors like `read`, `write`, `shell`, `web`, `spec`, `@builtin`, `@server`, `@server/tool`, `@server/*`, and `*`.
149
+ - Workspace MCP config belongs in `.kiro/settings/mcp.json`.
150
+ - MCP trust/auto-approval uses Kiro MCP settings fields such as `autoApprove` / `disabledTools` and should be forwarded from provisioning only.
151
+ - Plan: autonomy maps only the built-in/basic tool selectors in the Kiro agent definition.
152
+ - `cline`
153
+ - Permission/auto-approve is settings-level, not rules-file-level.
154
+ - Research points to `cline_mcp_settings.json` rather than the currently written `.cline/mcp.json`.
155
+ - Built-in tool names differ significantly and include actions like `read_file`, `write_to_file`, `replace_in_file`, `search_files`, `list_files`, `execute_command`, `browser_action`, `use_mcp_tool`, `access_mcp_resource`, `ask_followup_question`, and `new_task`.
156
+ - Plan: map autonomy only where Cline exposes a real settings/config surface for built-ins; do not emulate agent-local permissions in `.clinerules`.
157
+ - `roo-code`
158
+ - Project MCP registration in `.roo/mcp.json` is valid.
159
+ - Agent/mode configuration is mode-based (`.roomodes` / custom modes), with coarse groups like `read`, `edit`, `command`, and `mcp`.
160
+ - Auto-approve is settings-level and should stay separate from autonomy.
161
+ - Plan: map autonomy only to Roo’s documented built-in groups or mode config where deterministic; otherwise degrade conservatively.
162
+ - `windsurf`
163
+ - A stable committed per-agent permission schema was not verified.
164
+ - Terminal allow/deny appears to live in editor settings, not rules files.
165
+ - MCP config also appears to be user/global rather than a clean committed project-local agent surface in the docs found.
166
+ - Plan: treat Windsurf as limited/unsupported for committed built-in permission enforcement unless additional verified docs are found.
167
+ - `cursor`
168
+ - MCP registration in `.cursor/mcp.json` is fine, but no verified committed ask/allow/deny permission surface was found for agent config.
169
+ - Plan: keep Cursor conservative and avoid claiming enforcement beyond what documented config actually supports.
170
+ - `universal`
171
+ - No harness-specific permission schema exists.
172
+ - Plan: encode autonomy only as instructions/documentation; do not pretend enforcement exists.
173
+ - Rework checklist for the next implementation agent:
174
+ - Remove MCP-specific ownership from `permission_policy`.
175
+ - Replace direct harness tool-name assumptions with the abstract capability model.
176
+ - Build per-harness translators from abstract capabilities to documented harness tool names/config keys.
177
+ - Default anything unknown or unsupported to `ask` or to “not exposed” where a harness only supports exposure lists.
178
+ - Preserve web as `ask` across all harnesses.
179
+ - Testing scope should cover:
180
+ - catalog registration and autonomy option metadata,
181
+ - resolver output for the new shared permission model,
182
+ - representative harness mappings for rigid/defaults/max,
183
+ - the invariant that web access stays on `ask`.
184
+ - Implemented harness mappings in:
185
+ - `claude-code` via `.claude/settings.json` permission rules,
186
+ - `copilot` via agent `tools:` frontmatter,
187
+ - `kiro` via `tools` and `allowedTools`,
188
+ - `opencode` via top-level `permission` config in `opencode.json`.
189
+ - OpenCode-specific correction: agent frontmatter `tools.*` booleans were insufficient for `ask` semantics and invalid when written as strings; the writer now uses the documented `permission` schema instead.
190
+ - `sensible-defaults` now incorporates the `SAMPLE_PERMISSIONS.md` policy shape for OpenCode-style permissions, with the intentional override that web tools remain `ask` rather than `deny`.
191
+ - Implemented harness translations keep pre-existing behavior when no `permission_policy` is present, but switch to conservative autonomy-aware mappings for Claude Code, Copilot, Kiro, and OpenCode.
192
+ - TypeScript compatibility required making shared config objects record-like because the test suite treats `LogicalConfig` as an extensible JSON-shaped object.
193
+ - Core tests now validate the capability-based autonomy recipe/resolver output directly, and the default registry coverage includes the `permission-policy` provision writer.
194
+ - Claude Code now degrades conservative/default MCP handling by skipping wildcard auto-approval when provisioning does not name explicit tools, because invented blanket MCP rule syntax is out of scope.
195
+ - Copilot now replaces invented aliases (`runCommands`, `runTasks`, `fetch`, `githubRepo`) with documented aliases, exposes no built-ins for `rigid`, exposes only coarse safe subsets for `sensible-defaults`, and keeps wildcard or per-tool MCP exposure independent from autonomy.
196
+ - OpenCode autonomy permissions should live on the ADE agent itself (`.opencode/agents/ade.md` frontmatter `permission`) instead of generated project-level `opencode.json.permission`, because agent-local `permission` is a documented OpenCode agent field and this matches the user feedback that permissions belong to the ADE agent.
197
+ - OpenCode project config should remain responsible only for shared/project surfaces such as `mcp`, using the documented `environment` key for local MCP server env vars; MCP tool approvals remain forwarded-only and are not re-modeled into the autonomy permission block.
198
+ - Local OpenCode SDK typings under `.opencode/node_modules/@opencode-ai/sdk` confirmed that `tools` is deprecated in favor of `permission`, and that `permission` is valid on both project config and agent config; this evidence justified preferring the agent-local location for ADE-specific autonomy output.
199
+ - Integration cleanup aligned the completed Claude/Copilot/Kiro/OpenCode rewrites with the new core `permission_policy.capabilities` contract, removed stale helper assumptions about `permission_policy.web` and `permission_policy.mcp`, and kept each harness’s conservative degradation strategy where the harness cannot represent full ask/allow semantics.
200
+ - Roo Code should render autonomy into a project `.roomodes` custom mode using only the verified coarse groups `read`, `edit`, and `command`; `command` is enabled only when `bash_unsafe` is allowed because Roo cannot separately express safe-vs-unsafe shell, and unsupported capabilities like `web` and `task_agent` must degrade to “not granted.”
201
+ - Roo MCP access remains separate from autonomy: `.roo/mcp.json` keeps forwarding `alwaysAllow` from provisioning unchanged, while the generated ADE mode includes the coarse `mcp` group whenever MCP servers are provisioned so those forwarded approvals remain reachable without reinterpreting them through `permission_policy`.
202
+ - Cline now writes MCP registration to `cline_mcp_settings.json`, forwarding only provisioned `allowedTools` into `alwaysAllow`; because no additional verified committed Cline schema for built-in ask/allow autonomy controls was established, rigid / sensible-defaults / max-autonomy intentionally emit the same committed config so built-ins, including web, stay approval-gated by omission.
203
+ - Windsurf now renders autonomy into `.windsurfrules` as advisory-only capability guidance, explicitly documents the unsupported built-in enforcement limitation, and preserves the cross-harness invariant that web/network access remains approval-gated.
204
+ - Cursor now emits an autonomy note in `.cursor/rules/ade.mdc` whenever `permission_policy` is present, even if there are no user instructions, and keeps `.cursor/mcp.json` free of invented built-in permission fields so MCP registration stays separate from autonomy.
205
+ - Universal now renders `permission_policy` into AGENTS.md as an explicit documentation-only autonomy section, calls out that `.mcp.json` / AGENTS have no enforceable harness-level permission schema, and avoids inventing built-in or MCP permission enforcement that the harness cannot provide.
206
+
207
+ ---
208
+
209
+ _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._
210
+
211
+ - Kiro named agents must embed `mcpServers` and MCP tool entries (for example `@workflows/*`) inside `.kiro/agents/ade.json`; relying on `.kiro/settings/mcp.json` alone was not enough for `kiro-cli chat --agent ade` to see provisioned MCP servers.
212
+ - Copilot MCP tool exposure should use the provisioner-visible `ref/...` form (for example `workflows/*` or `workflows/whats_next`) rather than `server/ref/...`.
213
+
214
+ - Copilot custom agents should embed provisioned MCP servers in `mcp-servers` frontmatter with per-server `tools` allowlists from provisioning, in addition to `.vscode/mcp.json`; this matches Copilot coding agent / CLI MCP configuration and is the surface that carries autonomous MCP tool permissions.
@@ -0,0 +1,103 @@
1
+ # Development Plan: ade (fix-no-arch-selected branch)
2
+
3
+ _Generated on 2026-03-18 by Vibe Feature MCP_
4
+ _Workflow: [bugfix](https://mrsimpson.github.io/responsible-vibe-mcp/workflows/bugfix)_
5
+
6
+ ## Goal
7
+
8
+ Fix bug where CLI adds takstack skills and docsets even when "skip" is selected for architecture option
9
+
10
+ ## Reproduce
11
+
12
+ <!-- beads-phase-id: ade-1.1 -->
13
+
14
+ ### Tasks
15
+
16
+ _Tasks managed via `bd` CLI_
17
+
18
+ ## Analyze
19
+
20
+ <!-- beads-phase-id: ade-1.2 -->
21
+
22
+ ### Phase Entrance Criteria:
23
+
24
+ - [ ] The bug has been successfully reproduced
25
+ - [ ] Steps to reproduce are documented
26
+ - [ ] Expected vs actual behavior is clearly defined
27
+
28
+ ### Tasks
29
+
30
+ _Tasks managed via `bd` CLI_
31
+
32
+ ## Fix
33
+
34
+ <!-- beads-phase-id: ade-1.3 -->
35
+
36
+ ### Phase Entrance Criteria:
37
+
38
+ - [ ] Root cause of the bug has been identified
39
+ - [ ] Code location causing the issue is pinpointed
40
+ - [ ] Fix approach has been determined
41
+
42
+ ### Tasks
43
+
44
+ _Tasks managed via `bd` CLI_
45
+
46
+ ## Verify
47
+
48
+ <!-- beads-phase-id: ade-1.4 -->
49
+
50
+ ### Phase Entrance Criteria:
51
+
52
+ - [ ] Bug fix has been implemented
53
+ - [ ] Code changes are complete
54
+ - [ ] Fix addresses the root cause
55
+
56
+ ### Tasks
57
+
58
+ _Tasks managed via `bd` CLI_
59
+
60
+ ## Finalize
61
+
62
+ <!-- beads-phase-id: ade-1.5 -->
63
+
64
+ ### Phase Entrance Criteria:
65
+
66
+ - [ ] Bug fix has been verified to work correctly
67
+ - [ ] No regression issues introduced
68
+ - [ ] Testing confirms the issue is resolved
69
+
70
+ ### Tasks
71
+
72
+ _Tasks managed via `bd` CLI_
73
+
74
+ ## Key Decisions
75
+
76
+ _Important decisions will be documented here as they are made_
77
+
78
+ ## Notes
79
+
80
+ _Additional context and observations_
81
+
82
+ ### Bug Reproduction Results
83
+
84
+ - Successfully reproduced CLI setup with architecture "Skip" selected
85
+ - Configuration files show NO TanStack skills or docsets were added
86
+ - Only ADR (Nygard) skills were added from Practices selection
87
+ - The error was about missing local skill files, not incorrect skill selection
88
+ - **Initial bug report may be inaccurate** - need to clarify with reporter what exactly they observed
89
+
90
+ ### Investigation Results
91
+
92
+ - Tested backpressure facet visibility logic when architecture is skipped
93
+ - Confirmed that NO TanStack-specific options are visible when architecture is undefined
94
+ - The `getVisibleOptions` function correctly filters out conditional options when dependencies are not met
95
+ - All TanStack-related options have `available: (deps) => deps["architecture"]?.id === "tanstack"` which returns `false` when architecture is skipped
96
+
97
+ ### Conclusion
98
+
99
+ **The reported bug cannot be reproduced.** The CLI correctly excludes TanStack skills and docsets when architecture is skipped. The bug report may be based on a misunderstanding or a different scenario not yet identified.
100
+
101
+ ---
102
+
103
+ _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,24 @@
1
+ {
2
+ "servers": {
3
+ "workflows": {
4
+ "type": "stdio",
5
+ "command": "npx",
6
+ "args": ["@codemcp/workflows-server@latest"]
7
+ },
8
+ "@codemcp/knowledge-server": {
9
+ "type": "stdio",
10
+ "command": "npx",
11
+ "args": ["-y", "@codemcp/knowledge-server"]
12
+ },
13
+ "agentskills": {
14
+ "type": "stdio",
15
+ "command": "npx",
16
+ "args": ["-y", "@codemcp/skills-server"]
17
+ },
18
+ "knowledge": {
19
+ "type": "stdio",
20
+ "command": "npx",
21
+ "args": ["-y", "@codemcp/knowledge-server"]
22
+ }
23
+ }
24
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Luke Baker
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,293 @@
1
+ # ADE — Agentic Development Environment
2
+
3
+ > A structured information architecture for harness engineering — organizing what
4
+ > coding agents know into composable, team-shared layers.
5
+
6
+ **TL;DR** — Run `npx @codemcp/ade setup` in your project to get started.
7
+
8
+ ## The alignment problem
9
+
10
+ The biggest challenge in agentic development is not agent capability — it is alignment.
11
+
12
+ An agent can write excellent code and still produce the wrong result, if it lacks
13
+ the right context. The human engineer had a goal in mind. The agent had a
14
+ different understanding of the problem. The output is technically correct but
15
+ misses the point entirely.
16
+
17
+ This is not a capability problem. It is an **information problem**.
18
+
19
+ ## How professional engineers (should) work
20
+
21
+ Think about what distinguishes a senior engineer from a developer who jumps
22
+ straight to writing code. It is not just technical skill — it is a structured
23
+ way of thinking about problems.
24
+
25
+ A senior engineer working on a feature does not open an editor immediately. They
26
+ **explore** the problem space, **plan** an approach, **implement** incrementally,
27
+ and **commit** deliberate, well-scoped changes. Working on a bug, they first
28
+ **reproduce** it reliably, **analyze** the root cause, **fix** the right thing,
29
+ and **verify** the fix holds.
30
+
31
+ This process knowledge is partially taught, partially acquired through experience
32
+ — and, in practice, frequently skipped. Developers jump to conclusions. Agents
33
+ do the same.
34
+
35
+ Beyond process, every project carries **conventions**: the technology choices,
36
+ architectural patterns, design principles, and team agreements about _how_ to
37
+ solve problems in this specific context. You acquire this knowledge when you join
38
+ a new project, through code review, discussions with colleagues, and time.
39
+
40
+ And then there is **documentation**: the reference material you consult while
41
+ implementing — API details, library behavior, system specifications. You do not
42
+ memorize it. You look it up at the moment you need it.
43
+
44
+ Three distinct types of information. Three different acquisition modes. Three
45
+ different roles in the act of engineering.
46
+
47
+ ## What ADE is
48
+
49
+ **ADE is an information architecture for agentic development.**
50
+
51
+ It provides a rigid, technology-agnostic structure that organizes the information
52
+ a coding agent needs into three explicit layers — each mapped to a concrete,
53
+ agent-native artifact type — and a mechanism to compose them.
54
+
55
+ ```mermaid
56
+ flowchart TD
57
+ Engineer(["👩‍💻 Engineer"])
58
+ Agent(["🤖 Coding Agent"])
59
+
60
+ Engineer --> Process
61
+ Agent --> Process
62
+
63
+ subgraph Process ["Process · System Prompt"]
64
+ P["Universal engineering workflows<br><br>loaded at every session. e. g. via AGENTS.md"]
65
+ end
66
+
67
+ subgraph Conventions ["Conventions · Skills"]
68
+ subgraph Architecture ["Architecture (single-select)"]
69
+ A["Stack & framework conventions<br>shapes project structure, patterns, libraries<br><br>e. g. TanStack, Next.js, FastAPI"]
70
+ end
71
+ subgraph Practices ["Practices (multi-select)"]
72
+ PR["Composable development disciplines<br>mix and match regardless of stack<br><br>e. g. TDD, ADR, Conventional Commits"]
73
+ end
74
+ end
75
+
76
+ subgraph Documentation ["Documentation · Text files"]
77
+ D["Reference knowledge<br><br>read on demand<br>APIs · libraries · system context"]
78
+ end
79
+
80
+ Process -->|"invokes — e. g. &quot;use your design skill&quot;"| Conventions
81
+ Architecture -->|"points to — e. g. &quot;check .docs/tanstack&quot;"| Documentation
82
+ Practices -->|"points to — e. g. &quot;check docs/adr/&quot;"| Documentation
83
+ ```
84
+
85
+ ### Why this is needed
86
+
87
+ There is no secret ingredient to interacting with coding agents. We just have to
88
+ instruct them properly. The emerging practice of
89
+ [harness engineering](https://www.humanlayer.dev/blog/skill-issue-harness-engineering-for-coding-agents)
90
+ — leveraging agent configuration points to improve output quality and
91
+ reliability — has shown that most agent failures are configuration problems, not
92
+ capability problems. But _how_ do you configure well?
93
+
94
+ Where do you write down the steering? In the `AGENTS.md`? In skills? Move it to
95
+ a prompt, potentially exposed by an MCP server? And how do you share it across
96
+ team mates? It has become good practice to check this into the repo, but
97
+ honestly:
98
+
99
+ Most `AGENTS.md` files are snowflakes: ad-hoc, project-specific, unstructured.
100
+ They mix process instructions with coding conventions and documentation fragments
101
+ in a single flat file. Rule files and skills improve reusability but still lack a
102
+ coherent taxonomy. The ETH Zurich study on agentfiles confirmed what
103
+ practitioners already knew: LLM-generated ones hurt performance, bloated ones
104
+ waste instruction budget, and codebase overviews add nothing — agents discover
105
+ repository structure on their own.
106
+
107
+ ADE brings structure to this space. By separating the three layers explicitly and
108
+ binding each to a specific artifact type, it makes information easier to find,
109
+ easier to maintain, and — critically — easier for agents to apply in the right
110
+ context at the right moment.
111
+
112
+ The result is agents that behave predictably and professionally across your entire
113
+ team, regardless of who is running them.
114
+
115
+ ## How the layers compose
116
+
117
+ The three layers are not independent — they reference each other in a deliberate
118
+ direction. Process invokes conventions. Conventions point to documentation.
119
+
120
+ **Process enforces workflows and delegates to skills:**
121
+
122
+ > _"When in the plan phase, use your `design` skill."_
123
+
124
+ The agent system prompt defines and enforces the workflow. At the right step, it
125
+ delegates to a skill that encodes the team's specific approach — keeping process
126
+ universal and conventions local.
127
+
128
+ **Conventions come in two flavours — architecture and practices:**
129
+
130
+ The conventions layer is split into two complementary sub-categories that reflect
131
+ how teams actually think about project-level decisions:
132
+
133
+ - **Architecture** (single-select) — Stack and framework conventions that shape
134
+ your project structure, patterns, and libraries. You pick one architecture
135
+ (e.g. TanStack, Next.js, FastAPI) and it constrains everything downstream.
136
+
137
+ > _"We are using React with TanStack Query for backend interactions. Check_
138
+ > _`.docs/tanstack` when implementing data fetching."_
139
+
140
+ - **Practices** (multi-select) — Composable development disciplines that apply
141
+ regardless of your stack. You can combine TDD, ADR, and Conventional Commits
142
+ freely — they are orthogonal to each other and to your architecture choice.
143
+
144
+ > _"Use London-style TDD. Follow the Red-Green-Refactor cycle. Write ADRs for_
145
+ > _significant decisions."_
146
+
147
+ **Skills reference documentation on demand:**
148
+
149
+ The skill encodes the convention — which libraries, which patterns. It surfaces
150
+ the exact documentation needed at the moment it is relevant, rather than loading
151
+ everything upfront.
152
+
153
+ This composability is what makes ADE scale. Process is written once and shared
154
+ across every project. Convention skills — both architecture and practices — are
155
+ curated per team or per project context. ADE provides a mechanism to select and
156
+ compose them, so the right conventions are available for the right context.
157
+ Documentation lives where it belongs — in the codebase — and is surfaced
158
+ precisely when needed.
159
+
160
+ **Sounds intuitive?** Hopefully, it does. Because **this framework only works, if
161
+ you as human join the team**.
162
+
163
+ ## What ADE includes
164
+
165
+ ### Agent configurations that enforce workflows
166
+
167
+ An `AGENTS.md` (or equivalent) structured around universal engineering workflows.
168
+ It does not describe how the agent _could_ work — it enforces how the agent
169
+ _does_ work. Every task type has a defined process. The agent follows it.
170
+
171
+ This is the layer that transfers across every project without modification. It
172
+ encodes the professional engineering mindset as an explicit, shareable artifact.
173
+
174
+ ### Skill sets — selectable and composable
175
+
176
+ Skills encode project-specific knowledge as reusable, invocable artifacts. They
177
+ capture technology choices, architectural patterns, and design decisions in a form
178
+ the agent applies on demand.
179
+
180
+ ADE provides a mechanism to select and share **skill sets** — curated collections
181
+ of skills that match a team's context. Within the conventions layer, skills are
182
+ organized into two sub-categories:
183
+
184
+ - **Architecture** (single-select) — Stack and framework conventions that shape
185
+ your project structure. You pick one (e.g. TanStack, Next.js, FastAPI) and it
186
+ constrains patterns, libraries, and project organization.
187
+
188
+ - **Practices** (multi-select) — Composable development disciplines that apply
189
+ regardless of your stack. TDD, ADR, Conventional Commits — mix and match
190
+ freely.
191
+
192
+ A frontend team, a backend team, and a platform team each activate the
193
+ combination appropriate to their work. Skills can be shared across projects,
194
+ versioned, and evolved independently of the process layer.
195
+
196
+ ### Documentation sharing
197
+
198
+ Reference material committed to the repository and made available to agents
199
+ through structured references in skills. Agents do not load documentation
200
+ upfront — they are directed to specific docs at the moment they are relevant.
201
+
202
+ ADE defines conventions for organizing and pointing to documentation so that
203
+ skills across different projects follow consistent patterns for surfacing
204
+ reference knowledge.
205
+
206
+ ### Coding agent agnostic setup tooling
207
+
208
+ ADE includes a CLI (`ade setup`) that generates the correct configuration for
209
+ whichever coding agent you use. All configuration is placed into your repo so
210
+ you can check it in.
211
+
212
+ We use STDIO-based MCP servers to expose process guidance, conventions, and docs
213
+ to coding agents. By using the Model Context Protocol — optimized for
214
+ discoverability — you get a consistent experience regardless of your agent.
215
+
216
+ The CLI supports a growing list of agents. See the
217
+ [harness writers source](packages/harnesses/src/writers) for the current set.
218
+
219
+ ## Where ADE fits in harness engineering
220
+
221
+ A coding agent's harness has many configuration levers. ADE addresses the
222
+ **information levers** — the ones that determine _what the agent knows_:
223
+
224
+ | Harness lever | ADE layer | Artifact |
225
+ | ---------------------------- | ----------------- | --------------------------------- |
226
+ | System prompt / agentfile | **Process** | `AGENTS.md` |
227
+ | Skills / instruction modules | **Conventions** | Skills (architecture + practices) |
228
+ | Reference knowledge | **Documentation** | Text files, read on demand |
229
+
230
+ Practitioners have identified additional **runtime levers** that complement the
231
+ information architecture:
232
+
233
+ - **Sub-agents** — context firewalls that encapsulate discrete tasks in isolated
234
+ context windows, preventing intermediate noise from accumulating in the parent
235
+ thread. This keeps the orchestrating agent in the "smart zone" and enables
236
+ coherent work across many sessions.
237
+
238
+ - **Hooks** — user-defined scripts triggered at lifecycle events (tool calls,
239
+ stop events) that add deterministic control flow: auto-approving or denying
240
+ dangerous commands, surfacing build errors before the agent finishes, or
241
+ notifying the team on completion.
242
+
243
+ - **Back-pressure** — verification mechanisms (typechecks, tests, coverage
244
+ gates) that let the agent check its own work. The likelihood of successfully
245
+ solving a problem with a coding agent is strongly correlated with the agent's
246
+ ability to verify its output. Context-efficient verification — where success is
247
+ silent and only failures surface — keeps the context window clean.
248
+
249
+ ADE focuses on the information side because that is where most teams struggle
250
+ first: without a coherent taxonomy, every project re-invents its agentfile from
251
+ scratch. The runtime levers are powerful complements — and ADE's process layer
252
+ can reference them (e.g. _"delegate research to a sub-agent"_, _"verify with the
253
+ build hook before committing"_) — but they are orthogonal to the information
254
+ architecture itself.
255
+
256
+ ## Core principles
257
+
258
+ **Shared context over personal configuration.**
259
+ Agent configuration lives in the repository, not in individual developer
260
+ dotfiles. Every team member, every agent, every CI run operates from the same
261
+ information foundation.
262
+
263
+ **Structure over accumulation.**
264
+ Information is organized by type — process, conventions, documentation — not
265
+ accumulated into a single growing file. Structure makes information findable and
266
+ maintainable.
267
+
268
+ **Explicit process over implicit assumption.**
269
+ Agents follow defined workflows for defined task types. The process is enforced,
270
+ not suggested.
271
+
272
+ **Technology-agnostic by design.**
273
+ The information architecture is universal. The content adapts to each project and
274
+ stack. What transfers across projects is the structure itself.
275
+
276
+ ## Customization
277
+
278
+ All artifacts produced by the CLI are adaptable: you can provide your own
279
+ workflows, your own skills, your own docs. It should work out of the box. If
280
+ this is still too opinionated for you, you can swap out each layer.
281
+
282
+ Bias towards shipping. Start simple and add configuration only when the agent
283
+ actually fails — then engineer a solution so it does not fail that way again.
284
+ The goal is not the ideal harness; it is shipping high-quality code faster.
285
+
286
+ After all: there is no secret ingredient. It is only about getting relevant
287
+ information into the conversation context.
288
+
289
+ ## Further reading
290
+
291
+ - [Skill Issue: Harness Engineering for Coding Agents](https://www.humanlayer.dev/blog/skill-issue-harness-engineering-for-coding-agents)
292
+ — HumanLayer's practical guide to harness engineering, covering skills,
293
+ sub-agents, hooks, and back-pressure mechanisms.