ECC/scripts
Vishnu Pradeep b27551897d
fix(hooks): wrap SessionStart summary with stale-replay guard (#1536)
The SessionStart hook injects the most recent *-session.tmp as
additionalContext labelled only with 'Previous session summary:'.
After a /compact boundary, the model frequently re-executes stale
slash-skill invocations it finds inside that summary, re-running
ARGUMENTS-bearing skills (e.g. /fw-task-new, /fw-raise-pr) with the
last ARGUMENTS they saw.

Observed on claude-opus-4-7 with ECC v1.9.0 on a firmware project:
after compaction resume, the model spontaneously re-enters the prior
skill with stale ARGUMENTS, duplicating GitHub issues, Notion tasks,
and branches for work that is already merged.

ECC cannot fix Claude Code's skill-state replay across compactions,
but it can stop amplifying it. Wrap the injected summary in an
explicit HISTORICAL REFERENCE ONLY preamble with a STALE-BY-DEFAULT
contract and delimit the block with BEGIN/END markers so the model
treats everything inside as frozen reference material.

Tests: update the two hooks.test.js cases that asserted on the old
'Previous session summary' literal to assert on the new guard
preamble, the STALE-BY-DEFAULT contract, and both delimiters. 219/219
tests pass locally.

Tracked at: #1534
2026-04-21 18:02:19 -04:00
..
ci fix: bootstrap plugin-installed hook commands safely 2026-04-14 20:24:21 -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: support disabling bundled mcp servers 2026-04-05 14:37:28 -07:00
codex-git-hooks fix: skip pre-push checks on branch deletion 2026-03-29 23:09:26 +09:00
hooks fix(hooks): wrap SessionStart summary with stale-replay guard (#1536) 2026-04-21 18:02:19 -04:00
lib Merge origin/main into fix/urgent-install-and-name 2026-04-14 20:23:54 -07:00
build-opencode.js fix: restore ci baseline for opencode packaging 2026-04-05 14:47:26 -07:00
catalog.js feat: add install catalog and project config autodetection 2026-03-27 05:56:39 -04:00
claw.js fix(scripts): resolve claude.cmd on Windows by enabling shell for spawn (#1471) 2026-04-21 18:02:13 -04:00
doctor.js fix(scripts): add os.homedir() fallback for Windows compatibility 2026-03-28 11:28:12 +08:00
ecc.js fix(installer): validate hooks and settings before install 2026-03-28 19:55:34 -04:00
gan-harness.sh fix: harden install planning and sync tracked catalogs 2026-03-31 22:57:48 -07:00
gemini-adapt-agents.js feat: add gemini agent adapter 2026-04-08 15:38:49 -07:00
harness-audit.js fix: harden urgent install and gateguard patch 2026-04-14 19:44:08 -07:00
install-apply.js fix: document supported claude hook install path 2026-04-12 23:29:45 -07:00
install-plan.js feat: add install catalog and project config autodetection 2026-03-27 05:56:39 -04:00
list-installed.js fix(scripts): add os.homedir() fallback for Windows compatibility 2026-03-28 11:28:12 +08: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 fix: sync opencode hook banner version 2026-04-13 00:15:55 -07:00
repair.js fix(scripts): add os.homedir() fallback for Windows compatibility 2026-03-28 11:28:12 +08:00
session-inspect.js feat: self-improving skills loop — observe, inspect, amend, evaluate 2026-03-14 23:21:18 -07:00
sessions-cli.js fix(scripts): add os.homedir() fallback for Windows compatibility 2026-03-28 11:28:12 +08: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: narrow unicode cleanup scope 2026-03-29 21:21:18 -04:00
skills-health.js feat(design): skill health dashboard mockup (#518) 2026-03-16 14:01:41 -07:00
status.js fix(scripts): add os.homedir() fallback for Windows compatibility 2026-03-28 11:28:12 +08:00
sync-ecc-to-codex.sh feat: sync the codex baseline and agent roles 2026-04-01 16:08:03 -07:00
uninstall.js fix(scripts): add os.homedir() fallback for Windows compatibility 2026-03-28 11:28:12 +08:00