Commit graph

5 commits

Author SHA1 Message Date
Kevin Turcios
de6046df8d Replace Node.js SessionStart hook with bash (106ms → 5ms)
The codex session-lifecycle-hook.mjs SessionStart path only appends
two env vars to CLAUDE_ENV_FILE. Rewrite that as a bash script to
avoid ~100ms V8 startup overhead. SessionEnd stays in Node.js since
it needs async broker teardown and process tree management.
2026-04-21 05:07:03 -05:00
Kevin Turcios
42b855899f Reduce hook latency by consolidating subprocess calls
Collapse multiple jq/grep/sed invocations into single passes:
- post-compact-state-inject: 7 jq calls → 1 (-51%)
- session-start: 6 sed/grep → 1 sed pipeline (-37%)
- user-prompt-context-inject: 2 jq → 1 (-33%)
- pre-compact-state-save: 3 tail|grep → 1 awk (-42%)
- post-tool-benchmark-capture: 3 jq → 1 (-23%)
- stop-optimization-gate: 3 tail|grep → 1 awk
- pre-compact: fix macOS-incompatible sed newline escaping
2026-04-21 05:01:53 -05:00
Kevin Turcios
7e00007569
Improve deep optimizer: profiling script + failure modes + dist fix (#24)
* Exclude dev docs from plugin dist builds

README.md, ARCHITECTURE.md, and ROADMAP.md are development docs that
shouldn't ship in the assembled plugin distributions.

* Improve deep optimizer: fix profiling script, add failure mode awareness

Profiling script: Accept source root and command as CLI args instead of
hardcoding `src` and requiring manual `# === RUN TARGET HERE ===` edits.
The agent now copies the script from references and runs it with the
project's actual source root and test command.

Failure modes: Wire failure-modes.md into the on-demand reference table
and stuck recovery checklist so the agent consults it when workflows
break (deadlocks, silent failures, context loss, stale results).

* Fix ruff lint errors in unified profiling script

Refactor main() into parse_args(), profile_command(), and
report_results() to fix C901 (complexity) and PLR0915 (too many
statements). Also fix S306 (mktemp → NamedTemporaryFile), PLW1510
(explicit check=False), and add noqa for intentional os.path usage
(PTH112) and subprocess with CLI args (S603).
2026-04-15 04:11:52 -05:00
Kevin Turcios
33faedf427
Add Unstructured report, rewrite statusline, format evals/scripts (#20)
* Add Unstructured engagement report as uv workspace member

Three-tier Plotly Dash app (Executive Brief, Engineering Team, Full
Detail) with data in JSON, theme constants in theme.py, and Dash
production improvements (Google Fonts, clientside callbacks, meta tags).

Also: add .playwright-mcp/ to .gitignore, add reports/* ruff overrides,
remove tracked .codeflash/observability/read-tracker.

* Rewrite statusline to derive context from git state

Detects active area from changed files (reports, packages, plugin,
.codeflash, case-studies, evals), falls back to branch name convention
(perf/*, feat/*, fix/*), shows dirty indicator. Uses whoami for
cross-platform user detection.

* Add pre-push lint rule to commit guidelines

* Exclude .codeflash/ from ruff linting

Benchmark and profiling scripts in .codeflash/ are scratch work, not
package source. Excluding them prevents CI failures from ad-hoc scripts.

* Run ruff format across packages, scripts, evals, and plugin refs

* Fix github-app async test failures in CI

Add asyncio_mode = "auto" to root pytest config so async tests
are detected when running from the repo root via uv run pytest packages/.
2026-04-15 03:06:16 -05:00
Kevin Turcios
3b59d97647 squash 2026-04-13 14:12:17 -05:00