ECC/scripts
Chris Yau f563fe2a3b
fix: codex sync merges AGENTS.md instead of replacing it (#715)
The sync script previously overwrote ~/.codex/AGENTS.md on every run,
destroying any user-authored content. This adds marker-based merging
(<!-- BEGIN ECC --> / <!-- END ECC -->) so only the ECC-managed section
is replaced on subsequent runs, preserving user content outside the
markers.

Merge logic:
- No file → create with markers
- Both markers present (ordered, CRLF-safe) → replace only the ECC section
- BEGIN without END (corrupted) → full replace (backup saved)
- No markers at all → append ECC block (preserves existing content)

Also fixes:
- Symlink preservation: uses cat > instead of mv to write through symlinks
- CRLF handling: strips \r in marker detection to handle Windows-edited files
- Marker ordering: validates BEGIN appears before END, not just that both exist

The legacy heading-match heuristic was intentionally removed per council
review: any unmarked file is either user-authored (append is safe) or
legacy ECC-generated (duplicates once, deduplicates on next run via
markers). A timestamped backup is always saved before any mutation.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Happy <yesreply@happy.engineering>
2026-03-20 06:38:32 -07:00
..
ci fix(ci): enforce catalog count integrity (#525) 2026-03-16 13:37:51 -07:00
codemaps feat: add scripts/codemaps/generate.ts codemap generator Fixes #247 - The generate.ts script referenced in agents/doc-updater.md was missing from the repository. This adds the actual implementation. The script: - Recursively walks the src directory (skipping node_modules, dist, etc.) - Classifies files into 5 areas: frontend, backend, database, integrations, workers - Generates docs/CODEMAPS/INDEX.md + one .md per area - Uses the codemap format defined in doc-updater.md - Supports optional srcDir argument: npx tsx scripts/codemaps/generate.ts [srcDir] 2026-02-22 16:19:16 +05:30
codex feat: add Codex CLI customization scripts (#336) 2026-03-16 14:02:40 -07:00
codex-git-hooks feat: add Codex CLI customization scripts (#336) 2026-03-16 14:02:40 -07:00
hooks feat: add MCP health-check hook (#711) 2026-03-20 05:56:21 -07:00
lib feat: agent description compression with lazy loading (#696) 2026-03-20 03:53:22 -07:00
claw.js fix: stabilize windows hook and claw tests 2026-03-05 12:37:24 -08:00
doctor.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
ecc.js fix: resolve all CI test failures (19 fixes across 6 files) (#519) 2026-03-16 01:59:53 -07:00
harness-audit.js fix(harness-audit): make scoring deterministic with scripted rubric (#524) 2026-03-16 13:34:30 -07:00
install-apply.js feat: wire manifest resolution into install execution (#509) 2026-03-15 21:47:22 -07:00
install-plan.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
list-installed.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
orchestrate-codex-worker.sh fix: resolve all CI test failures (19 fixes across 6 files) (#519) 2026-03-16 01:59:53 -07:00
orchestrate-worktrees.js fix: preserve orchestration launcher compatibility 2026-03-12 15:40:25 -07:00
orchestration-status.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
release.sh chore: release v1.7.0 2026-02-27 06:06:41 -08:00
repair.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
session-inspect.js feat: self-improving skills loop — observe, inspect, amend, evaluate 2026-03-14 23:21:18 -07:00
sessions-cli.js feat: add SQLite state store and query CLI (#510) 2026-03-16 01:32:21 -07:00
setup-package-manager.js fix: reject flags passed as package manager names in setup-package-manager CLI 2026-02-13 03:37:46 -08:00
skill-create-output.js fix: use nullish coalescing for confidence default + add 3 tests (round 85) 2026-02-13 12:11:26 -08:00
skills-health.js feat(design): skill health dashboard mockup (#518) 2026-03-16 14:01:41 -07:00
status.js feat: add SQLite state store and query CLI (#510) 2026-03-16 01:32:21 -07:00
sync-ecc-to-codex.sh fix: codex sync merges AGENTS.md instead of replacing it (#715) 2026-03-20 06:38:32 -07:00
uninstall.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00