Commit 90bd6ee
outrider setup-local: --two-tier flag with live-fetched templates (#47)
* feat(outrider): --two-tier flag for setup-local, templates fetched from remyxai/outrider@v1
Adds an opt-in --two-tier flag to `remyxai outrider setup-local`. When
set, installs the drafter/refiner companion workflows alongside the
existing outrider.yml:
* outrider.yml — workflow_dispatch only, no cron (manual + refiner target)
* outrider-daily.yml — drafter role, daily cron, Anthropic Haiku 4.5,
publish=branch, maintain-state=true, staged-synthesis=false
* outrider-weekly-refine.yml — refiner orchestrator, weekly cron,
picks candidate from past 7 days + generates gap analysis via
Sonnet 4.6 + dispatches Opus refinement with lead-content inline
Templates are FETCHED live from remyxai/outrider@v1 at install time
(via gh api) rather than embedded inline in the CLI. Design rationale:
treat the outrider repo as the canonical source of truth for the
workflow shape so template refinements propagate to new customer
installs automatically without requiring a CLI release.
--two-tier currently opts in; default install behavior is unchanged
(single-file outrider.yml with the legacy weekly cron). A follow-up
CLI release can flip the default once the templates on
remyxai/outrider@v1 have accumulated a few production weeks.
Dry-run mode renders all three files when --two-tier is set so
customers can preview before opting in.
15 existing tests still pass (no regression). Fetch-based render path
is a new code path; a follow-up should add a test that mocks the gh api
response for both templates and asserts the substitution + write
ordering.
* fix(outrider two-tier): make drafter/refiner install actually run on target repos
Addresses review feedback on #47:
* Drafter `uses: ./` rewrite (blocking). The @v1 drafter references the
action locally; on a customer repo that resolves to their root (no
action.yml). _render_drafter_workflow now rewrites `uses: ./` →
`uses: remyxai/outrider@v1`, guarded like the interest-id rewrite.
* Runner declares the refiner's dispatch inputs (blocking). The refiner
dispatches outrider.yml with mode/publish/start-from-ref/lead-content/
staged-synthesis, which GitHub rejected as unknown workflow_dispatch
keys. _render_local_workflow now declares + forwards all five; defaults
match the action's own so scheduled/manual runs are unchanged.
* Document the fork schedule caveat (note). Two-tier PR body + plan output
now note that `schedule:` triggers don't self-run on forks; wires up the
previously-unused PR_TITLE_TWO_TIER.
Also fixes _fetch_outrider_template passing a stray leading "api" arg to
_gh_api_json (which already prepends `gh api`), which produced
`gh api api repos/...` and broke every two-tier fetch.
Refiner over-selection (note 4) is already resolved upstream in
remyxai/outrider (drafter-known-branch enumeration) and propagates via the
live @v1 fetch — no CLI change needed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(outrider two-tier): optional per-stage model flags for setup-local
Adds --drafter-model / --refiner-model / --refine-model (+ --zai-key) so the
two-tier install can retune any stage's model — including routing it at z.ai's
GLM — without hand-editing the fetched workflow files. Defaults are unchanged:
omit the flags and all three stages stay single-provider on Anthropic, so an
install still needs only ANTHROPIC_API_KEY.
Provider is inferred from the model name (glm-* -> z.ai Bearer auth via
ZAI_API_KEY; claude-* -> Anthropic). When any stage selects a GLM model the CLI
resolves a z.ai key (--zai-key / $ZAI_API_KEY / $Z_AI_KEY / prompt) and sets it
as the ZAI_API_KEY repo secret. The transforms mirror the manual edits exactly:
drafter env/base-url swap, refiner gap-analysis endpoint+auth swap, and the
refiner's dispatch provider/model flags. Structural rewrites are guarded so a
template shape change fails loud rather than silently skipping.
Reproduces the previously-manual GLM-drafter + GLM-refiner + Opus-refine config
as a one-liner:
setup-local --two-tier --drafter-model glm-5.2 --refiner-model glm-5.2 \
--refine-model claude-opus-4-8
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: salma-remyx <salma@remyx.ai>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1a7c865 commit 90bd6ee
3 files changed
Lines changed: 598 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
705 | 743 | | |
706 | 744 | | |
707 | 745 | | |
| |||
717 | 755 | | |
718 | 756 | | |
719 | 757 | | |
720 | | - | |
| 758 | + | |
| 759 | + | |
721 | 760 | | |
722 | 761 | | |
723 | 762 | | |
| |||
762 | 801 | | |
763 | 802 | | |
764 | 803 | | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
765 | 809 | | |
766 | 810 | | |
767 | 811 | | |
| |||
776 | 820 | | |
777 | 821 | | |
778 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
779 | 828 | | |
780 | 829 | | |
781 | 830 | | |
| |||
0 commit comments