Skip to content

Develop - #100

Merged
sampleXbro merged 64 commits into
masterfrom
develop
Jul 20, 2026
Merged

Develop#100
sampleXbro merged 64 commits into
masterfrom
develop

Conversation

@sampleXbro

@sampleXbro sampleXbro commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Test coverage

Checklist

  • Tests written first (TDD)
  • All CI checks pass (pnpm test, pnpm lint, pnpm typecheck)
  • Changeset added (pnpm changeset) for user-visible changes

Add LedgerCell, CapabilityLedger, LEVEL_RANK, CAPABILITY_FEATURES, and
CAPABILITY_SCOPES to src/core/capabilities/ledger-types.ts. Suppress knip
unused-export warnings for this file via ignoreIssues since consumers
arrive in subsequent tasks.
warp/mcp/global, copilot/mcp/global, gemini-cli/hooks (proj+global) confirmed
raise-candidates; windsurf/mcp/global confirmed native; windsurf project,
copilot/hooks, kiro/hooks rejected with evidence.
…ns to native

- agents (project/global): emit required groups + non-empty roleDefinition
  in .roomodes / custom_modes.yaml (Roo's modeConfigSchema has no default
  for either, so omitting them silently dropped ALL modes on load)
- agents (global): fix custom_modes.yaml path to ~/.roo/settings/... (was
  missing the .roo/ prefix)
- rules (global): stop redirecting the root rule to ~/.roo/AGENTS.md (never
  read by Roo Code); keep it at ~/.roo/rules/00-root.md like loadRuleFiles()
  actually reads, with the old AGENTS.md path kept as a legacy import fallback
- mcp (global): downgrade native -> partial; ~/mcp_settings.json is not the
  real read path (McpHub resolves via non-deterministic globalStorageUri)
- ignore (global): downgrade native -> none; RooIgnoreController only reads
  workspace-relative .rooignore, no home-directory concept exists
- permissions (project): raise partial -> native; write/merge/import
  roo-cline.allowedCommands/deniedCommands via .vscode/settings.json

Split index.ts into layout.ts/merge.ts to stay under the 200-line limit.
Core: generatePermissionsFeature now passes scope context to generators.

Recorded ledger provenance for all 6 changed cells and synced README/docs.
- permissions (project+global): none -> native via .codex/rules/*.rules
  using the same Starlark prefix_rule(pattern, decision, justification)
  DSL Codex already documents for command-execution permission decisions
- hooks (project+global): drop canonical Notification hooks (no matching
  Codex lifecycle event exists) instead of silently emitting a dead
  hooks.Notification key; add a lint warning
- additionalRules (project): write real nested <dir>/AGENTS.md /
  AGENTS.override.md files for scoped rules (Codex's actual directory-walk
  instruction hierarchy) instead of the unread .codex/instructions/ mirror
  plus a link-only root index entry
- mcp: support remote/Streamable HTTP servers (url/bearer_token_env_var/
  http_headers) on both generate and import; the importer previously
  hardcoded type:'stdio' and dropped url-based servers on import

Recorded ledger provenance for all changed cells and synced README/docs.
… commands

- MCP (global): none -> native. ~/.copilot/mcp-config.json (mcpServers key),
  wired via globalSupport.scopeExtras with generator + importer round-trip.
  Corrects a prior ledger cell that pointed at the VS Code extension's
  OS-specific user-profile mcp.json instead of Copilot CLI's own path.
- Hooks (global): none -> native. ~/.copilot/hooks/agentsmesh.json + wrapper
  scripts, same {version, hooks} schema as project scope, wired via
  scopeExtras so the project-shaped generator never leaks into global paths.
- Permissions (global): none -> partial. ~/.copilot/permissions-config.json
  only records saved approvals (no deny/ask/default-mode/URL/tool-filter/
  repo-local policy support), so this is a lint warning, not a generator.
- Commands (global): native -> none. Copilot CLI has no prompt-file/
  slash-command mechanism at all (github/copilot-cli#618, maintainer,
  closed); the phantom .copilot/prompts/ path is no longer generated or
  imported. Project-scope commands (.github/prompts/, a real VS Code
  Copilot Chat surface) are unaffected.
- Hooks (project, broken-fix): generateHooks now emits the real top-level
  matcher regex field instead of a non-functional comment field, so hooks
  actually filter by tool. The canonical '*' wildcard sentinel is omitted
  (Copilot compiles matcher as ^(?:PATTERN)$, and a bare '*' is an invalid
  regex that would skip the whole entry). Importer prefers the real field,
  falling back to the legacy comment for previously-generated files.

Re-verification note: the research pass also flagged canonical Notification
hooks as unsupported -- current docs contradict that ('notification' is a
real, documented Copilot hook event), so no change was made there.
…tive)

- additionalRules (project + global): .opencode/rules/<slug>.md files are
  now also declared in opencode.json's instructions array (project glob
  .opencode/rules/*.md; global absolute ~/.config/opencode/rules/*.md).
  OpenCode does not auto-scan any rules directory (opencode.ai/docs/rules)
  -- only AGENTS.md/CLAUDE.md auto-discover -- so generated rule files were
  previously invisible to stock OpenCode.
- agents (project + global): emit a real permission object (e.g.
  permission: { edit: deny }) mapped from canonical tools/disallowedTools
  via a new permission-map.ts, instead of tools/disallowedTools frontmatter
  keys that OpenCode's schema does not support (disallowedTools does not
  exist; tools is deprecated and boolean-map shaped, not a string array).
  The importer translates permission back into tools/disallowedTools so
  restrictions round-trip.
- fix mergeOpenCodeSettings: it delegated to the generic Claude-shaped
  settings merger, which only ever carried over permissions(plural)/hooks
  from fresh content -- silently freezing mcp/permission/instructions at
  whatever the first generate wrote. It now merges OpenCode's own
  mcp/permission/instructions keys directly.
- add capability-ledger cells for opencode additionalRules/agents
  (project + global), verdict confirmed, sourced from opencode.ai docs.
- target-contract.matrix.test.ts: a target's own native-directory prefix
  legitimately appearing in its own generated settings file is not a
  cross-target leak; exclude the current target's own prefix from the
  no-target-specific-prefix-leak check.
…and frontmatter keys

- additionalRules (global): embedded -> native. Non-root rules now write
  real files to ~/.qwen/rules/<slug>.md (loadRules() reads .qwen/rules/
  from both global and project dirs identically) instead of being folded
  into ~/.qwen/QWEN.md's body. Adds QWEN_GLOBAL_RULES_DIR, global layout
  rewrite/rulePath wiring, and an importer-spec global source; removes
  the now-dead renderQwenGlobalInstructions embedding helper.
- additionalRules (project + global): rename emitted frontmatter key
  globs: -> paths: in .qwen/rules/<slug>.md - Qwen's parseRuleFile() only
  recognizes paths: for conditional rule injection, so globs: was always
  silently ignored. Importer gains a frontmatterRemap to translate paths:
  back onto the canonical globs field for round-trip.
- commands (project + global): stop emitting allowed-tools frontmatter in
  .qwen/commands/<name>.md - MarkdownCommandDefSchema has no tool-
  restriction field, so it was dead. Adds a lintCommands warning.
- Ledger: add/update qwen-code cells (additionalRules project+global,
  commands project+global) as confirmed with source URLs.
- Docs: regenerate README.md / supported-tools.mdx support matrices;
  hand-update the global-mode paths table row for the new rules dir.
- commands (project+global): native -> embedded. Amp has no declarative
  slash-command file format (ampcode.com/manual); commands only exist
  via amp.registerCommand(...) in a TS plugin. Generated output is
  unchanged (still .agents/skills/<name>/SKILL.md via the native skills
  surface) -- only the declared level was wrong.
- hooks (project+global): native -> none. buildAmpScopedSettings() wrote
  a fabricated "amp.hooks" key into .amp/settings.json. Re-verified via
  live full-page render plus 14+ months of Wayback Machine snapshots
  (May 2025 - Jul 2026): ampcode.com/manual never mentions hooks. Only
  amp.on(...) plugin code exists, no declarative surface. Removed the
  amp.hooks branch from buildAmpScopedSettings and mergeAmpSettings, and
  added a lintHooks warning (mirrors the existing lintIgnore pattern).
- Deprecated an existing lesson that had fabricated a detailed amp.hooks
  array schema from a hallucinated source, and added a corrected lesson
  with the verification trail.
- Updated capability-ledger.json (commands confirmed embedded; hooks
  marked rejected for both scopes) and synced README/website support
  matrix via matrix:generate.
…ents/mcp/hooks/rules

Rebase the cline target on the standalone CLI's documented layout
(docs.cline.bot/cli/cli-reference) instead of the VS Code extension's
IDE-era paths, per confirmed capability-drift research.

- rules (project+global, native): .clinerules/{slug}.md -> .cline/rules/;
  ~/Documents/Cline/Rules/ -> ~/.cline/data/settings/rules/. Drop the
  undocumented flat-file .clinerules convention (directory only).
- hooks (project+global, native): .clinerules/hooks/*.sh -> .cline/hooks/*.sh;
  both scopes now resolve to the identical relative path.
- mcp (project, native): .cline/cline_mcp_settings.json -> .cline/mcp.json
  (old name + .cline/mcp_settings.json still accepted on import).
- mcp (global): native -> none. No global MCP path is documented.
- skills (global, native): .cline/skills/ -> .cline/data/settings/skills/.
- agents (project, native): restructure from one file per agent
  (.cline/agents/<name>.md, undocumented) to a single combined
  .cline/agents.yaml (CLI docs: "Agent definitions"). agentPath() now
  returns null (no per-name destination), matching roo-code's .roomodes.
- agents (global): native -> none. No agents.yaml/agents/ is documented
  under ~/.cline/data/settings/.
- ignore (global): native -> none. docs.cline.bot/customization/clineignore
  documents .clineignore as strictly per-workspace-root.
- permissions (project+global): none -> partial. No writable permissions
  file exists; approval is --auto-approve/CLINE_COMMAND_PERMISSIONS/UI only.
  A no-op generator stub plus a lint warning point users at these.

Commands (workflows) are unaffected — the CLI reference doesn't document
a workflows surface, so the existing .clinerules/workflows/ path is kept.

Records ledger provenance for every changed cell and syncs README +
website docs (support matrix, global-mode paths table, CLI reference
prose, hooks Windows-portability note).
…schema

- Commands (project + global, none -> native): .rovodev/prompts.yml
  (+ ~/.rovodev/prompts.yml) saved-prompts manifest, with a
  .rovodev/commands/<name>.md content file per canonical command.
  Commands are no longer projected as skills for this target.
- MCP (project): native -> none. No project-level MCP file is documented;
  only ~/.rovodev/mcp_config.json (global) exists.
- MCP (global): renamed the generated/imported file from
  ~/.rovodev/mcp.json to the real ~/.rovodev/mcp_config.json.
- Permissions (global): rewrote toolPermissions to the real nested
  tools.<name> / tools.bash.{default,commands} schema instead of a flat
  allow/deny/ask list.
- Updated capability ledger, README/website support matrix, contract
  fixtures, and reference-rewrite test helpers to match.
…nds, downgrade project hooks

- hooks (project): native -> none; docs.langchain.com/oss/javascript/deepagents/code/hooks
  documents only the global ~/.deepagents/hooks.json, no project-level surface exists
- hooks (global): broken-fix; generator wrote Claude-Code-style {EventName:[...]} shape,
  Deep Agents actually reads a flat {hooks:[{command,events}]} array (hooks-format.ts);
  wired via globalSupport.scopeExtras (gated scope==='global') plus a matching importer
- agents (project+global): none -> native; docs list a dedicated
  .deepagents/agents/{name}/AGENTS.md (project) / ~/.deepagents/{agent}/agents/{name}/AGENTS.md
  (global) subagent surface, distinct from skill-projection (agent-format.ts)
- commands (project+global): none -> embedded; no dedicated command format exists,
  routed through the existing skills-projection mechanism (declaration-only fix)
- rules/skills/agents (global): broken-fix; global paths were identical to project paths
  instead of the documented per-agent-instance dir ~/.deepagents/{agent}/... (default
  instance name "agent" per docs) - added DEEPAGENTS_CLI_DEFAULT_AGENT_NAME
- updated capability-ledger.json (confirmed cells + one rejected for project hooks),
  README/docs support matrices, and blast-radius references (import-maps, contract
  paths, e2e reference-targets, target-contract-matrix projected-agents set)
…global ignore

- Rules/AdditionalRules/Commands/Agents (global, native): move from the
  ~/.kilo/ mirror to the documented ~/.config/kilo/ unified config dir;
  non-root rules now register under kilo.jsonc's `instructions` key
  (a bare rules dir isn't auto-loaded at global scope).
- MCP (global, native): fold into kilo.jsonc's `mcp` key with kilo's own
  type/command schema instead of a standalone mcp.json + mcpServers
  wrapper; add importGlobalKiloMcp() for the reverse direction.
- mergeKiloConfig now overlays instructions/mcp alongside permission so
  the three writes to the shared kilo.jsonc compose correctly.
- Ignore (global): native -> none; no documented global .kilocodeignore
  equivalent exists (workspace-root-only per kilo's own docs).
- Skills (global) re-verified unchanged: ~/.kilo/skills/ is correct.
- Update capability-ledger.json, README/website support matrix, and add
  a changeset.
…gnore-lint dispatch

- reference/map.ts, output-source-map.ts: track combined-agent output sources so the rewriter resolves references inside merged agent files
- import-maps/cline.ts, roo-code.ts, trae.ts: add missing import-map entries for agent and hook paths introduced by capability audit
- generate/engine.ts: gate rules rewrite on descriptor layout presence, preventing empty rules blocks from leaking into embed-only targets
- lint/linter.ts: dispatch descriptor.lint.ignore so partial-ignore targets (Jules, Pi Agent, Kiro, etc.) emit warnings
- zed/lint.ts: remove unused lintHooks export (hooks=none; silent-drop guard covers it)
… loss, report over-declared cells

- src/core/capabilities/merge.ts: extract mergeCell/hasNonEmptyFingerprint into pure unit-tested module; register pnpm capabilities:merge script
- scripts/merge-capability-ledger.ts: fix two data-loss bugs — confirmed/rejected cells now keep their researched maxAchievable ceiling; fingerprint preservation checks all three arrays (topLevelKeys, requiredFrontmatter, keyChecks)
- src/core/capabilities/audit.ts: report over-declared cells independently from unverified so both signals surface together
- package.json/pnpm-lock.yaml: register capabilities:merge script
- CONTRIBUTING.md: document audit/merge workflow
…ws path to ~/.gemini/antigravity/global_workflows/
agentsmesh check verified only canonical sources against the lock, so
direct edits to generated files passed CI despite documented behavior.

- generate records checksums of all generated outputs in .agentsmesh/.lock
  (outputs map); full runs replace the map, --targets/--features runs
  merge per-path
- check re-hashes recorded outputs and exits 1 on hand-edited or deleted
  files; JSON gains outputsModified/outputsRemoved/outputsChecked
- new check --no-outputs flag skips output verification (gitignored
  outputs in CI); old-format locks skip with a hint until regenerated
- hashes mirror hashFileForManifest (BOM strip + LF normalize) so
  line-ending-only rewrites are not drift
- MCP check tool now performs output verification (passes projectRoot)
- merge's lock rewrite intentionally omits outputs until regenerate
- docs: check/generate/merge CLI pages, CI guide, generation pipeline,
  MCP reference, README lock description
The hono ^4.12.25 CORS-advisory override (6885150) was added only to
package.json pnpm.overrides, leaving pnpm-workspace.yaml and the lockfile
overrides snapshot stale. This broke CI's pnpm 10 --frozen-lockfile with
ERR_PNPM_LOCKFILE_CONFIG_MISMATCH. Add hono to the workspace overrides and
regenerate the lock so all three sources agree.
Trailing working-tree artifacts from the completed check output-drift work
(1991a3f): captured lessons (incl. pnpm three-source override sync), the
Fix #98 task log, and the regenerated agents e2e run report.
…act ignores

The .cursor/, .kiro/, .warp/ (and sibling) ignore patterns were unanchored,
so they matched the same-named dirs inside tests/e2e/fixtures/ too. Three
fixture sources were thus silently gitignored and never committed:
  cursor-project/.cursor/cli.json          -> permissions.yaml
  kiro-project/.kiro/hooks/review-on-save.json -> hooks.yaml
  warp-project/.warp/.mcp.json             -> mcp.json filesystem server
They exist locally (tests pass) but are absent on CI's fresh checkout, so
import reads null and silently skips emission, failing import-capabilities
e2e only on CI. Root-anchor every generated-artifact pattern (leading /,
matching the existing /docs//tasks/ convention) and commit the three files.
generateRules built the execution-rule output path with
`rule.source.split('/').pop()`, which on Windows leaves the whole native
backslash absolute path as the "slug" — emitting a bogus
`.codex/rules/C:\...\.agentsmesh\rules\<name>.rules`. Its dirname mkdir
throws ENOENT (drive-colon mid-path), so `generate --targets codex-cli`
exits 1 on Windows CI while passing on POSIX (where absolute paths use '/').

Split on both separators (/[\\/]/) so the slug is the basename regardless
of platform. Adds a platform-independent regression test feeding a Windows
absolute source. Fixes codex-format-roundtrip, global-roundtrip-codex e2e
and generate unit test on Windows.
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.21922% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/core/capabilities/ledger.ts 92.85% 3 Missing ⚠️
src/core/capabilities/audit-report.ts 93.75% 2 Missing ⚠️
src/targets/opencode/scoped-settings.ts 88.88% 2 Missing ⚠️
src/core/capabilities/fingerprint.ts 98.38% 1 Missing ⚠️
src/core/reference/import-maps/cline.ts 95.65% 1 Missing ⚠️
src/targets/cline/agent-importer.ts 97.87% 1 Missing ⚠️
src/targets/deepagents-cli/hooks-format.ts 97.61% 1 Missing ⚠️
src/targets/factory-droid/importer.ts 95.83% 1 Missing ⚠️
src/targets/trae/importer.ts 96.42% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/cli/commands/check.ts 100.00% <100.00%> (ø)
src/cli/commands/generate-handlers.ts 96.22% <100.00%> (+0.14%) ⬆️
src/cli/commands/generate-lock.ts 100.00% <100.00%> (ø)
src/cli/help-data.ts 100.00% <ø> (ø)
src/cli/renderers/check.ts 100.00% <100.00%> (ø)
src/config/core/lock-outputs.ts 100.00% <100.00%> (ø)
src/core/capabilities/audit.ts 100.00% <100.00%> (ø)
src/core/capabilities/ledger-types.ts 100.00% <100.00%> (ø)
src/core/capabilities/merge.ts 100.00% <100.00%> (ø)
src/core/check/lock-sync.ts 100.00% <100.00%> (ø)
... and 136 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sampleXbro
sampleXbro merged commit 1231ac4 into master Jul 20, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants