Skip to content

feat: add CLI protocol setup commands for SECOM, ACE, and RLM#24

Merged
timeleft-- merged 9 commits intomainfrom
feature-23-cli-protocol-additions
Mar 10, 2026
Merged

feat: add CLI protocol setup commands for SECOM, ACE, and RLM#24
timeleft-- merged 9 commits intomainfrom
feature-23-cli-protocol-additions

Conversation

@timeleft--
Copy link
Copy Markdown
Member

Summary

  • Add fava-trails {secom,ace,rlm} setup [--write] CLI commands that print default hook YAML or write it directly to config.yaml with full jj commit dance
  • Add fava-trails secom warmup to pre-download the LLMLingua model (~700MB) before first use
  • Extract _find_jj_bin() shared helper from duplicated patterns in cmd_bootstrap/cmd_clone
  • Add DEFAULT_HOOK_ENTRY constants to each protocol module as single source of truth
  • Expand README, AGENTS_SETUP_INSTRUCTIONS, and FAQ with ACE/RLM docs and CLI setup instructions

Motivation

  1. SECOM deployment gap: First propose_truth with SECOM triggers a ~4min HuggingFace model download that exceeds hook timeout. secom warmup pre-downloads it.
  2. Config editing is error-prone: Agents editing config.yaml don't follow the jj commit dance, leaving uncommitted changes that trip cross-trail pollution guards. setup --write handles the full dance automatically.
  3. Documentation gap: ACE and RLM (merged to main) lacked CLI setup commands and documentation parity with SECOM.

Test plan

  • All 545 tests pass (uv run pytest -v)
  • Ruff clean (uv run ruff check src/)
  • Parametrized setup tests across all 3 protocols (YAML output, --write with jj dance, idempotency, preserves existing hooks, comment loss warning, jj-not-found error)
  • Warmup tests (missing llmlingua → error, success with mock compressor)
  • _find_jj_bin tests (PATH, fallback, not found)
  • Help output smoke tests for all subcommands

🤖 Generated with Claude Code

timeleft-- and others added 6 commits March 10, 2026 08:57
…tions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add DEFAULT_HOOK_ENTRY constants to secom, ace, rlm protocol modules
- Extract _find_jj_bin() helper, refactor cmd_bootstrap/cmd_clone to use it
- Add _cmd_protocol_setup() generic handler + cmd_{secom,ace,rlm}_setup wrappers
- Add cmd_secom_warmup() for pre-downloading LLMLingua model
- Wire secom/ace/rlm subcommands into CLI parser
- Add initial test coverage for setup commands (fixing test isolation in progress)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…plete)

- Fix _jj_commit_dance: jj new now includes -m '(new change)' per data repo convention
- Add warmup hint after secom setup --write
- Fix test isolation: use FAVA_TRAILS_DATA_REPO env + ConfigStore.reset()
- README: add ACE and RLM protocol sections with CLI setup examples
- AGENTS_SETUP_INSTRUCTIONS: expand protocols table, add CLI setup commands
- docs/fava_trails_faq.md: add protocol setup CLI examples + SECOM warmup FAQ

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread src/fava_trails/cli.py Fixed
Comment thread src/fava_trails/cli.py Fixed
timeleft-- and others added 3 commits March 10, 2026 12:40
Fixes ruff E402 (module-level imports not at top) and F401 (unused imports).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- _jj_commit_dance returns bool, bails on first failure
- _cmd_protocol_setup warns when jj dance fails after config save
- Wrap config.yaml read/write in error handling
- secom warmup returns 1 on compression test failure
- _find_jj_bin checks is_file + executability, not just existence
- Remove redundant imports (importlib, os) in cmd_secom_warmup
- Fix _find_jj_bin tests to be properly assertive
- Fix test_bootstrap_fails_if_jj_missing to patch _find_jj_bin

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@timeleft-- timeleft-- merged commit 01504a5 into main Mar 10, 2026
7 checks passed
@timeleft-- timeleft-- deleted the feature-23-cli-protocol-additions branch March 10, 2026 16:51
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.

1 participant