Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ fails the verb instead of going unchecked.
- `foundry-init.sh` — one-shot repo scaffold.
- `setup-labels.sh` — create the GitHub labels the workflows + ticket state machine need (agent:ready/working/blocked, align, ruleset-change, autofix). Idempotent; run by `foundry-init`.
- `foundry-pr-report` - one-shot, non-blocking PR check reporter: prints the bucket verdict for a PR's checks and, on failure, dumps the failing steps' logs via `gh run view --log-failed`; exits 0 (all passed/skipped), 1 (a check failed), or 2 (still pending). Trigger-agnostic by design, so a PR-authoring agent gets the actual failure text looped back without a blocking watch: call it once CI has finished, from whatever async trigger you wire up (a local post-push hook, a webhook-fired routine, or a background task that resumes the session). Needs `gh`.
- `jev/` — the **advisory** Jev layer: `client.mjs` (provider port lifted from jev-triage), `route.mjs` (pure routing/triage core), and `review.mjs` (runnable review pre-filter: `node scripts/jev/review.mjs [baseRef]` prints per-file `{review, lens, reason}` routing JSON). Near-free System-One decisions on the **proposer** side only: which diff hunks warrant deep review and on which lens. Opt-in via `JEV_API_KEY` (+ `JEV_PROVIDER`/`JEV_MODEL`/`TYPESAFE_AI_BASE_URL`); absent key ⇒ every caller fails open to current behavior (review all). **Never in the deterministic gate** — `boundary.test.mjs` reds the build if a gate workflow or mise verb references it; the `jev-scripts.yml` workflow runs the suite (`node --test scripts/jev/*.test.mjs`) on change.
- `jev/` — the **advisory** Jev layer: `client.mjs` (provider port lifted from jev-triage), `route.mjs` (pure routing/triage core), and `review.mjs` (runnable review pre-filter: `node scripts/jev/review.mjs [baseRef]` prints per-file `{review, lens, reason}` routing JSON). Near-free System-One decisions on the **proposer** side only: which diff hunks warrant deep review and on which lens. Opt-in via `JEV_API_KEY` (+ `JEV_PROVIDER`/`JEV_MODEL`/`TYPESAFE_AI_BASE_URL`); absent key ⇒ every caller fails open to current behavior (review all). **Never in the deterministic gate** — `boundary.test.mjs` reds the build if a gate workflow or mise verb references it; the `jev-scripts.yml` workflow runs the suite (`node --test scripts/jev/*.test.mjs`) on change. The non-secret knobs have a commented home in every mise template's `[env]` block (the "Jev (advisory layer)" group: `JEV_PROVIDER`, `JEV_MODEL`, `TYPESAFE_AI_BASE_URL`, `JEV_REVIEW_MIN_FILES`, and the downstream `JEV_TOOLCALL_TRIAGE` / `JEV_FEATURE_PRECHECK` hook toggles); the key itself stays in the shell, never in committed config.

## Agent half — `cmaintz-skills`

Expand Down
18 changes: 18 additions & 0 deletions mise/dotnet.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ _.path = [
"{{config_root}}/scripts",
]

# -- Jev (advisory layer; opt-in, OFF unless set) --------------------------
# Foundry's near-free System One layer (see docs/FEATURES.md, the "jev/" entry):
# it only routes review and triages turns on the proposer side, never the gate.
# All of it stays off unless a key is present, so this whole block is optional.
#
# The key is NEVER committed: export JEV_API_KEY in your shell, not here. The
# lines below are the safe, non-secret knobs at their defaults; uncomment to
# change one. mise [env] reaches only processes under `mise run`/`mise exec` or
# a mise-activated shell, so a Claude Code hook sees these only when the editor
# was launched from such a shell.
#
# JEV_PROVIDER = "typesafe" # or "cloudflare" (then set CLOUDFLARE_ACCOUNT_ID)
# JEV_MODEL = "jev-latest" # pin to a version to freeze behavior
# TYPESAFE_AI_BASE_URL = "https://api.typesafe.ai/v1" # a self-host, proxy, or mock
# JEV_REVIEW_MIN_FILES = "0" # skip review routing on diffs at or under N files
# JEV_TOOLCALL_TRIAGE = "0" # 1 warns on risky tool calls (repos with that hook)
# JEV_FEATURE_PRECHECK = "0" # 1 pre-checks a feature ticket (repos with that hook)

[hooks]
# Provision the pinned habit-hooks on `mise install` (local and CI alike), like setup:pmd.
postinstall = "mise run setup:habit-hooks"
Expand Down
18 changes: 18 additions & 0 deletions mise/java.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,24 @@ _.path = [
# Gitignore `.foundry/`. Read it with `foundry-loop-report`. foundry-init installs the wrapper.
FOUNDRY_TELEMETRY = "{{config_root}}/.foundry/telemetry.jsonl"

# -- Jev (advisory layer; opt-in, OFF unless set) --------------------------
# Foundry's near-free System One layer (see docs/FEATURES.md, the "jev/" entry):
# it only routes review and triages turns on the proposer side, never the gate.
# All of it stays off unless a key is present, so this whole block is optional.
#
# The key is NEVER committed: export JEV_API_KEY in your shell, not here. The
# lines below are the safe, non-secret knobs at their defaults; uncomment to
# change one. mise [env] reaches only processes under `mise run`/`mise exec` or
# a mise-activated shell, so a Claude Code hook sees these only when the editor
# was launched from such a shell.
#
# JEV_PROVIDER = "typesafe" # or "cloudflare" (then set CLOUDFLARE_ACCOUNT_ID)
# JEV_MODEL = "jev-latest" # pin to a version to freeze behavior
# TYPESAFE_AI_BASE_URL = "https://api.typesafe.ai/v1" # a self-host, proxy, or mock
# JEV_REVIEW_MIN_FILES = "0" # skip review routing on diffs at or under N files
# JEV_TOOLCALL_TRIAGE = "0" # 1 warns on risky tool calls (repos with that hook)
# JEV_FEATURE_PRECHECK = "0" # 1 pre-checks a feature ticket (repos with that hook)

[hooks]
# Provision both pinned tools on `mise install` (local and CI alike). Array form runs
# them in order; each no-ops on a warm install.
Expand Down
19 changes: 19 additions & 0 deletions mise/kotlin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@
[tools]
java = "21" # Kotlin compiles on the JVM; pin to what the repo targets

[env]
# -- Jev (advisory layer; opt-in, OFF unless set) --------------------------
# Foundry's near-free System One layer (see docs/FEATURES.md, the "jev/" entry):
# it only routes review and triages turns on the proposer side, never the gate.
# All of it stays off unless a key is present, so this whole block is optional.
#
# The key is NEVER committed: export JEV_API_KEY in your shell, not here. The
# lines below are the safe, non-secret knobs at their defaults; uncomment to
# change one. mise [env] reaches only processes under `mise run`/`mise exec` or
# a mise-activated shell, so a Claude Code hook sees these only when the editor
# was launched from such a shell.
#
# JEV_PROVIDER = "typesafe" # or "cloudflare" (then set CLOUDFLARE_ACCOUNT_ID)
# JEV_MODEL = "jev-latest" # pin to a version to freeze behavior
# TYPESAFE_AI_BASE_URL = "https://api.typesafe.ai/v1" # a self-host, proxy, or mock
# JEV_REVIEW_MIN_FILES = "0" # skip review routing on diffs at or under N files
# JEV_TOOLCALL_TRIAGE = "0" # 1 warns on risky tool calls (repos with that hook)
# JEV_FEATURE_PRECHECK = "0" # 1 pre-checks a feature ticket (repos with that hook)

[tasks.fix]
description = "Auto-format (ktlint)"
run = "./gradlew ktlintFormat"
Expand Down
18 changes: 18 additions & 0 deletions mise/php.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,24 @@ _.path = [
"{{config_root}}/scripts",
]

# -- Jev (advisory layer; opt-in, OFF unless set) --------------------------
# Foundry's near-free System One layer (see docs/FEATURES.md, the "jev/" entry):
# it only routes review and triages turns on the proposer side, never the gate.
# All of it stays off unless a key is present, so this whole block is optional.
#
# The key is NEVER committed: export JEV_API_KEY in your shell, not here. The
# lines below are the safe, non-secret knobs at their defaults; uncomment to
# change one. mise [env] reaches only processes under `mise run`/`mise exec` or
# a mise-activated shell, so a Claude Code hook sees these only when the editor
# was launched from such a shell.
#
# JEV_PROVIDER = "typesafe" # or "cloudflare" (then set CLOUDFLARE_ACCOUNT_ID)
# JEV_MODEL = "jev-latest" # pin to a version to freeze behavior
# TYPESAFE_AI_BASE_URL = "https://api.typesafe.ai/v1" # a self-host, proxy, or mock
# JEV_REVIEW_MIN_FILES = "0" # skip review routing on diffs at or under N files
# JEV_TOOLCALL_TRIAGE = "0" # 1 warns on risky tool calls (repos with that hook)
# JEV_FEATURE_PRECHECK = "0" # 1 pre-checks a feature ticket (repos with that hook)

[hooks]
# Provision the pinned habit-hooks on `mise install` (local and CI alike), like setup:pmd.
postinstall = "mise run setup:habit-hooks"
Expand Down
18 changes: 18 additions & 0 deletions mise/python.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@ _.path = [
# Read it with `foundry-loop-report`. foundry-init installs the wrapper.
FOUNDRY_TELEMETRY = "{{config_root}}/.foundry/telemetry.jsonl"

# -- Jev (advisory layer; opt-in, OFF unless set) --------------------------
# Foundry's near-free System One layer (see docs/FEATURES.md, the "jev/" entry):
# it only routes review and triages turns on the proposer side, never the gate.
# All of it stays off unless a key is present, so this whole block is optional.
#
# The key is NEVER committed: export JEV_API_KEY in your shell, not here. The
# lines below are the safe, non-secret knobs at their defaults; uncomment to
# change one. mise [env] reaches only processes under `mise run`/`mise exec` or
# a mise-activated shell, so a Claude Code hook sees these only when the editor
# was launched from such a shell.
#
# JEV_PROVIDER = "typesafe" # or "cloudflare" (then set CLOUDFLARE_ACCOUNT_ID)
# JEV_MODEL = "jev-latest" # pin to a version to freeze behavior
# TYPESAFE_AI_BASE_URL = "https://api.typesafe.ai/v1" # a self-host, proxy, or mock
# JEV_REVIEW_MIN_FILES = "0" # skip review routing on diffs at or under N files
# JEV_TOOLCALL_TRIAGE = "0" # 1 warns on risky tool calls (repos with that hook)
# JEV_FEATURE_PRECHECK = "0" # 1 pre-checks a feature ticket (repos with that hook)

[hooks]
# Two provisioning tasks on `mise install` (local and CI alike): the project .venv tools
# and the pinned habit-hooks venv - the array form the java template uses for setup:pmd.
Expand Down
18 changes: 18 additions & 0 deletions mise/ts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,24 @@ FOUNDRY_TELEMETRY = "{{config_root}}/.foundry/telemetry.jsonl"
# See designs/changed-scope-gate.md. An unresolvable ref falls back to whole-tree
# (never skips). The signal is opt-in per verb; callers MUST NOT require it.

# -- Jev (advisory layer; opt-in, OFF unless set) --------------------------
# Foundry's near-free System One layer (see docs/FEATURES.md, the "jev/" entry):
# it only routes review and triages turns on the proposer side, never the gate.
# All of it stays off unless a key is present, so this whole block is optional.
#
# The key is NEVER committed: export JEV_API_KEY in your shell, not here. The
# lines below are the safe, non-secret knobs at their defaults; uncomment to
# change one. mise [env] reaches only processes under `mise run`/`mise exec` or
# a mise-activated shell, so a Claude Code hook sees these only when the editor
# was launched from such a shell.
#
# JEV_PROVIDER = "typesafe" # or "cloudflare" (then set CLOUDFLARE_ACCOUNT_ID)
# JEV_MODEL = "jev-latest" # pin to a version to freeze behavior
# TYPESAFE_AI_BASE_URL = "https://api.typesafe.ai/v1" # a self-host, proxy, or mock
# JEV_REVIEW_MIN_FILES = "0" # skip review routing on diffs at or under N files
# JEV_TOOLCALL_TRIAGE = "0" # 1 warns on risky tool calls (repos with that hook)
# JEV_FEATURE_PRECHECK = "0" # 1 pre-checks a feature ticket (repos with that hook)

[hooks]
# Provision the pinned habit-hooks on `mise install` (local and CI alike), like setup:pmd.
postinstall = "mise run setup:habit-hooks"
Expand Down
10 changes: 9 additions & 1 deletion scripts/jev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ min-files gate) routes every file to review - Jev only ever narrows spend, never
Read from the environment (keys never in CI):
`JEV_API_KEY`, `JEV_PROVIDER` (`typesafe` | `cloudflare`), `JEV_MODEL`
(defaults to `jev-latest`), `CLOUDFLARE_ACCOUNT_ID`, and `TYPESAFE_AI_BASE_URL`
(point the direct call at a self-host, proxy, or mock).
(point the direct call at a self-host, proxy, or mock). `review.mjs` also reads
`JEV_REVIEW_MIN_FILES`.

The non-secret knobs have a commented, opt-in home in each mise template's
`[env]` block (the "Jev (advisory layer)" group), so a repo centralizes them in
one place instead of scattering exports. Note the reach: a mise `[env]` value
only lands in processes started via `mise run` / `mise exec` or a mise-activated
shell, so a Claude Code hook picks it up only when the editor was launched from
such a shell. The key is never committed; export `JEV_API_KEY` in the shell.

## Tests

Expand Down
Loading