Commit Graph

201 Commits

Author SHA1 Message Date
Mhd Ghaith Al Abtah
7004a66243 feat(install-targets): add claude-project (per-project Claude Code) adapter
Completes the install-target matrix for Claude Code. Until now, ECC's
Claude support was home-scope only (~/.claude/) via the `claude` target.
This adds a project-scope counterpart (./.claude/) via a new
`claude-project` target so teams can install ECC per-repo without
contaminating ~/.claude/ — matching the existing project-scope adapters
for Cursor, Antigravity, Gemini, CodeBuddy, Joycode, and Zed.

Symmetric with `claude`:
- Same namespace under rules/ecc and skills/ecc
- Same docs/<locale> handling for --locale
- Same hooks placeholder substitution for hooks.json
- Reuses claude-home's destination-mapping logic 1:1

Use cases:
- Monorepos with multiple Flow-managed projects
- Teams that want ECC scoped per-project without touching ~/.claude/
- Per-project skill/rule isolation when global install isn't desirable

No breaking change: existing --target claude continues to route to
claude-home (user-scope) unchanged. New target is opt-in.

Tests
-----
- 4 new tests in tests/lib/install-targets.test.js
  (root resolution, lookup-by-id, plan parity with claude, foreign-path filtering)
- All install-target regression guards (schema enum / SUPPORTED_INSTALL_TARGETS)
  still pass
- End-to-end smoke: `--target claude-project --profile minimal --dry-run`
  emits 359 ops with destinations rooted at <projectRoot>/.claude/ (parity
  with --target claude which emits 359 ops rooted at ~/.claude/)
2026-05-19 12:14:27 -04:00
Affaan Mustafa
6cb194a3c6 fix(hooks): avoid escaped quotes in plugin bootstrap
Generate the inline hook root resolver with single-quoted JavaScript literals so Windows Git Bash does not choke on nested escaped double quotes before Node starts. Refresh hooks.json and add regression coverage for parsed hook commands and installed hook manifests.
2026-05-19 05:15:42 -04:00
Jamkris
d904edc615 test(lib): make concurrent-write test actually concurrent + use regex matcher for assert.throws
Two round-1 review findings in `tests/lib/session-bridge.test.js`,
both about test correctness rather than the underlying fix:

1. **greptile P1 + coderabbitai Major + cubic P2 (all three): concurrent-write test ran sequentially.**

   The test spawned two child processes with two consecutive
   `spawnSync` calls. Because `spawnSync` blocks until the child
   exits, the second writer started *after* the first finished —
   the two writers never overlapped, so the rename race the fix
   targets was never actually exercised. The test would have passed
   with the old broken `${target}.tmp` suffix.

   Fix: introduce a one-off "race runner" helper that runs inside
   its own subprocess and uses async `spawn` to start both writers
   simultaneously. The runner waits for both to exit (the event
   loop is local to the runner subprocess, so this stays compatible
   with the synchronous test harness used elsewhere in this file)
   and reports both exit codes plus stderrs on stdout. The test
   then calls the runner via `spawnSync` and parses the result.
   Both writer children now overlap for the duration of their 200
   `writeBridgeAtomic` calls each, which is enough wall time to
   reliably trigger the rename race against the pre-fix code.

   Verified: with the fixed `${target}.${pid}.${nonce}.tmp` suffix,
   the test passes; with the old fixed `${target}.tmp` suffix
   reintroduced, it fails as expected (one writer hits ENOENT on
   roughly half its rename calls).

2. **greptile P2 + cubic P3: `assert.throws` used a string as the second argument.**

   Node deprecated passing a string as the second argument to
   `assert.throws` years ago: the string is silently treated as
   the assertion failure message (what to print when the function
   does *not* throw) rather than as an error matcher. The check
   passed for any thrown error, not just the rename failure.

   Fix: pass a regex matcher as the second arg and keep the
   explanatory text as the third. The regex matches `EISDIR`,
   `EPERM`, `ENOTDIR`, or `ENOENT` because `renameSync` of a
   regular tmp file onto an existing directory raises different
   codes on Linux / macOS / BSD — making the matcher portable
   across CI runners.

Test count unchanged at 14; `npm test` green; `npm run lint` clean.

The two helper files (`tests/__tmp_bridge_writer.js`,
`tests/__tmp_bridge_race_runner.js`) are written and unlinked
inside the test's try/finally so they never persist beyond the
test run.
2026-05-19 04:57:10 -04:00
Jamkris
5acb01a276 test(lib): concurrent writeBridgeAtomic + tmp-cleanup regression
Two regression tests pin down the previous two commits' atomic-rename
fixes:

1. **concurrent writes don't throw ENOENT or corrupt the file** —
   spawns two child Node processes (`tests/__tmp_bridge_writer.js`
   created in-test, cleaned up in finally) that each call
   `writeBridgeAtomic(sid, …)` 200 times against the same session
   ID with independent payloads. Asserts both subprocesses exit 0
   (the previous implementation produced ENOENT on roughly 50% of
   rename calls, all swallowed by the in-test catch) and the final
   bridge file is parseable JSON belonging to one of the two writers
   (last-writer-wins is fine; the contract is *no corruption* and
   *no rename ENOENT*, not data preservation).

2. **tmp file cleanup on rename failure** — pre-creates a directory
   at the target bridge path so `renameSync(tmp, target)` fails,
   calls `writeBridgeAtomic`, asserts the call throws AND that no
   tmp file with the writer's `pid.<nonce>.tmp` prefix is left
   behind in `os.tmpdir()`. The previous code had no cleanup; the
   fix's `try/catch + unlinkSync` keeps tmpdir from accumulating
   orphan files across repeated rename failures.

The first test deliberately writes independent payloads from each
subprocess so this regression doesn't try to claim a property the
fix doesn't actually deliver (read-modify-write race in the caller
is a separate issue and out of scope per PR body).

Test count: 12 → 14 in `tests/lib/session-bridge.test.js`;
`npm test` green; `npm run lint` clean.
2026-05-19 04:57:10 -04:00
Affaan Mustafa
666b4e2261 fix(installer): harden locale docs install 2026-05-17 20:46:04 -04:00
Affaan Mustafa
744f416997 test: normalize zed install path assertion 2026-05-17 07:27:05 -04:00
Affaan Mustafa
2371a3cf05 feat: add zed install target 2026-05-17 07:06:49 -04:00
Affaan Mustafa
c2762dd569 feat: add Ruby and Rails rules 2026-05-13 06:27:08 -04:00
Affaan Mustafa
940135ea47 feat: add ECC statusline observability hooks
Salvages the useful statusline/context monitor work from stale PR #1504 while preserving the current continuous-learning hook runner wiring.

Adds the metrics bridge, context monitor, statusline script, shared cost/session bridge utilities, and tests. Fixes the reviewed false loop-detection hash collision for non-file tools, avoids default-session cost inflation, sanitizes statusline task lookup, and records hook payload session IDs in cost-tracker.
2026-05-11 23:44:06 -04:00
Affaan Mustafa
fd9453f6ee docs: salvage F# agent and language guidance 2026-05-11 21:43:17 -04:00
Divyesh Thirukonda
ab6e998383 fix: tune machine learning workflow routing 2026-05-11 18:11:05 -04:00
Divyesh Thirukonda
240d52d27f feat: add machine learning engineering workflow
(cherry picked from commit 4b0eeacd66b2f65b7b11d7f2c8bef056c50b08e4)
2026-05-11 17:55:50 -04:00
Affaan Mustafa
c45aeee57f fix: salvage remaining stale queue fixes (#1754) 2026-05-11 16:41:08 -04:00
Affaan Mustafa
fd820d6306 feat: sync GitHub queue into work items 2026-05-11 13:07:29 -04:00
Affaan Mustafa
9887ba6123 feat: add status exit code gate 2026-05-11 12:38:59 -04:00
Affaan Mustafa
b1e67788f7 feat: add work items CLI 2026-05-11 12:24:12 -04:00
Affaan Mustafa
8926ea925e feat: track linked work items in status 2026-05-11 12:07:27 -04:00
Affaan Mustafa
e70ef4a2ff feat: add Qwen install target 2026-05-11 11:27:46 -04:00
Affaan Mustafa
c7c1e36625 feat: add JoyCode install target 2026-05-11 11:10:59 -04:00
Affaan Mustafa
fb9a8f2973 feat: add status readiness rollup 2026-05-11 10:50:29 -04:00
Affaan Mustafa
d2760d0359 feat: add markdown status snapshots 2026-05-11 10:09:39 -04:00
Affaan Mustafa
12e1bc424d fix: port continuous-learning observer fixes
Ports continuous-learning observer signal, storage, remote normalization, and v1 deprecation fixes onto current main.
2026-05-11 03:35:42 -04:00
Affaan Mustafa
8a57679222 fix: restore short Claude plugin slug and skill installs (#1712) 2026-05-11 02:10:36 -04:00
Affaan Mustafa
e381c8d8a8 fix: namespace claude managed install paths 2026-04-30 07:53:20 -04:00
Affaan Mustafa
e1d6d853f7 fix: namespace cursor agent installs 2026-04-30 02:19:57 -04:00
Affaan Mustafa
5881554a1c fix: add no-hooks minimal install path 2026-04-30 01:57:31 -04:00
Affaan Mustafa
d49f0329a9 fix: avoid cursor nested AGENTS context pollution 2026-04-30 00:43:27 -04:00
Affaan Mustafa
06f9eca8e2 fix: retire legacy command shims from default surface 2026-04-29 23:56:40 -04:00
Affaan Mustafa
fc96be4924 test: cover skill tracker edge paths 2026-04-29 19:21:03 -04:00
Affaan Mustafa
7ca48f376f test: cover skill dashboard edge paths 2026-04-29 19:15:47 -04:00
Affaan Mustafa
880c487c0f test: cover state store query edge paths 2026-04-29 18:45:20 -04:00
Affaan Mustafa
45a9bcf295 test: lift harness manifest branch coverage 2026-04-29 18:38:48 -04:00
Affaan Mustafa
aaaf52fb1e test: cover session adapter edge cases 2026-04-29 18:21:31 -04:00
Affaan Mustafa
b40de37ccb test: cover install lifecycle edge paths 2026-04-29 17:56:25 -04:00
Affaan Mustafa
d9d52d8b77 test: cover install executor planning 2026-04-29 17:32:37 -04:00
Affaan Mustafa
92e0c7e9ff fix: install native Cursor hook and MCP config (#1543)
* fix: install native cursor hook and MCP config

* fix: avoid false healthy stdio mcp probes
2026-04-21 18:35:21 -04:00
Affaan Mustafa
76b6e22b4d fix: unblock urgent install and gateguard regressions 2026-04-14 19:23:07 -07:00
Affaan Mustafa
9e607ebb30 fix: prefer cursor native hooks during install 2026-04-13 00:07:15 -07:00
Affaan Mustafa
30f6ae4253 test: align cursor manifest expectations 2026-04-12 23:58:59 -07:00
Affaan Mustafa
7374ef6a73 fix: normalize cursor rule installs 2026-04-12 23:51:58 -07:00
Affaan Mustafa
133e881ce0 fix: install Cursor rules as mdc files 2026-04-12 23:32:39 -07:00
Affaan Mustafa
94e8f29d19 fix: use shared slash-command plugin root resolver 2026-04-12 23:10:29 -07:00
Affaan Mustafa
28edd197c2 fix: harden release surface version and packaging sync (#1388)
* fix: keep ecc release surfaces version-synced

* fix: keep lockfile release version in sync

* fix: remove release version drift from locks and tests

* fix: keep root release metadata version-synced

* fix: keep codex marketplace metadata version-synced

* fix: gate release workflows on full metadata sync

* fix: ship all versioned release metadata

* fix: harden manual release path

* fix: keep localized release docs version-synced

* fix: sync install architecture version examples

* test: cover shipped plugin metadata in npm pack

* fix: verify final npm payload in release script

* fix: ship opencode lockfile in npm package

* docs: sync localized release highlights

* fix: stabilize windows ci portability

* fix: tighten release script version sync

* fix: prefer repo-relative hook file paths

* fix: make npm pack test shell-safe on windows
2026-04-12 22:33:32 -07:00
Affaan Mustafa
1b3ccb85aa docs: mark continuous-learning v1 as legacy 2026-04-08 16:31:58 -07:00
Affaan Mustafa
86cbe3d616 feat: add c language compatibility 2026-04-08 15:42:49 -07:00
Affaan Mustafa
786f46dad5 feat: support disabling bundled mcp servers 2026-04-05 14:37:28 -07:00
Affaan Mustafa
1346f83b08 fix: shorten plugin slug to ecc 2026-04-05 14:31:30 -07:00
Affaan Mustafa
846ffb75da chore: ship v1.10.0 release surface refresh 2026-04-05 13:20:18 -07:00
Affaan Mustafa
b10080c7dd fix: respect home overrides in hook utilities 2026-04-02 18:22:07 -07:00
Affaan Mustafa
8f63697113 fix: port safe ci cleanup from backlog 2026-04-01 16:09:54 -07:00