Skip to content

feat(gap): add jcode policy overlay integration - #121

Merged
edheltzel merged 7 commits into
masterfrom
feat/jcode-overlay
Nov 13, 2026
Merged

edheltzel merged 7 commits into
masterfrom
feat/jcode-overlay

Conversation

@edheltzel

@edheltzel edheltzel commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Intent

Resolve Pullfrog's P2 on PR #121 (cmd/gap/harness.go:45): jcode v0.99.1 treats JCODE_HOME='' as an empty path and reads prompt-overlay.md from its working folder, so GAP now refuses a set-but-empty JCODE_HOME with an 'unset it' message instead of publishing to ~/.jcode. CODEX_HOME keeps empty=unset. Tests unset JCODE_HOME instead of setting it empty; TestJcodeHomeEmptyRefused covers the refusal; docs name the difference.

What Changed

  • Add jcode policy overlay publishing and uninstall cleanup, preserving text outside GAP markers.
  • Support absolute JCODE_HOME overrides; reject relative paths and set-but-empty values, with an “unset it” message for empty values. Keep empty CODEX_HOME equivalent to unset.
  • Add jcode skill-copy warnings, doctor detection, regression coverage, and documentation for the integration and home-level policy guidance.

Risk Assessment

✅ Low: The bounded home-validation changes preserve CODEX_HOME behavior and reject invalid JCODE_HOME before publication or removal; prior findings are resolved.

Testing

Reproduced the pre-fix bug, passed six live CLI scenarios and focused automated tests, checked documentation, and retained transcripts and generated overlays. The inherited-home test-isolation scenario remains untested live. The runtime surface is CLI-only, so no screenshots were needed; no full suite or static analysis ran.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Empty JCODE_HOME refuses sync with an “unset it” message and no writes; the preceding version reproduces the incorrect fallback publication ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/01-empty-regression.txt
Unset JCODE_HOME publishes to ~/.jcode, empty CODEX_HOME retains ~/.codex, and repeated sync preserves the overlay ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/02-default-and-codex.txt
An absolute JCODE_HOME containing spaces supports sync and uninstall while preserving surrounding user text ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/03-absolute-overlay-lifecycle.txt
Invalid home values refuse sync and uninstall, including previews, without changing overlays or publication records ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/04-invalid-home-no-side-effects.txt
Manifest sync warns once for differing jcode skill copies at either supported home and leaves all copies unchanged ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/05-shadow-copy-warnings.txt
Doctor reports the installed jcode executable ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/06-doctor-jcode.txt
Focused tests preserve an inherited JCODE_HOME overlay while temporary override cases succeed ⏸️ untested no The prior payload records supporting automated tests and explicitly excludes live GAP CLI execution for this scenario. It does not establish a live result for inherited JCODE_HOME isolation.
Evidence: Before-and-after CLI regression
$ ~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/gap-before-fix sync --yes --only=policy

HOME=~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home JCODE_HOME='' CODEX_HOME=''

exit=0
stdout:
gap sync will:
  policy    publish AGENTS.md to 7 harness files and 1 command
  manifest  1 skill from 1 source in global/skills.json (skills.sh, needs npx)  (skipped)
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.claude/rules/global-agent-policy.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.pi/agent/APPEND_SYSTEM.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.omp/agent/APPEND_SYSTEM.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.codex/gap/global-agent-policy.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.cursor/rules/global-agent-policy.mdc
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.empryo/EMPRYO.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.jcode/prompt-overlay.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.claude/commands/state-docs.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.pi/agent/prompts/state-docs.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.omp/agent/commands/state-docs.md
~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.codex/hooks.json
Trust both GAP hooks (SessionStart and SubagentStart) in Codex with /hooks, confirm a session and a subagent both get the policy, then run: gap sync --remove-codex-legacy
Skipped this run: manifest. To leave a component out of every sync, set enabled = false under [components.<id>] in ~/.config/gap/gap.toml.

stderr:


BEFORE: empty JCODE_HOME exited 0 and created ~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-before/home/.jcode/prompt-overlay.md
<!-- gap:begin -->
# AGENTS.md

GAP is the global agent policy for coding agents. This file is the contract. It is not a Stow package.

The nearest project `AGENTS.md` wins on that project's local contracts. Do not create `~/AGENTS.md`: harnesses that walk parent folders would load it into every project under home.

## How this file is loaded

Edit the markdown in this repo, then run `gap sync` (install it once with `go install ./cmd/gap` from the repo root). It writes regular file copies. It does not symlink, and it does not use Stow.

- Claude reads `~/.claude/rules/global-agent-policy.md`. Do not also point `~/CLAUDE.md` here. An ancestor `CLAUDE.md` suppresses project `AGENTS.md`.
- Pi reads `~/.pi/agent/APPEND_SYSTEM.md`. Pi does not scan `rules/`. Do not add `SYSTEM.md`.
- OMP reads `~/.omp/agent/APPEND_SYSTEM.md`. Do not add `SYSTEM.md`.
- Codex gets the policy from SessionStart and SubagentStart hooks that print `gap/global-agent-policy.md` in Codex home (`~/.codex`, or `CODEX_HOME`). Old policy text may remain in that `AGENTS.md` until cleanup, so Codex can load the policy twice. Do not add `AGENTS.override.md`.
- Cursor reads `~/.cursor/rules/global-agent-policy.mdc`.
- Empryo reads `~/.empryo/EMPRYO.md`. Do not add a second copy elsewhere.
- jcode reads `~/.jcode/prompt-overlay.md` (`JCODE_HOME` when set).
- Grok loads `~/.claude/rules/*.md` when Claude compatibility is on. Do not add a second copy.

Pi packaging, themes, and footers stay in `~/.pi/agent/AGENTS.md`. Do not paste them here.

## Style

- No em dashes. Use a plain hyphen.
- Never auto-add an agent name as a commit co-author.
- Never manually edit `CHANGELOG.md` or any file marked auto-generated.
- Prefer quality and maintainability over a cheaper build.
- Meet the ask with the smallest change that works.

## Before editing

Read the root `AGENTS.md`, then every `AGENTS.md` on the path to the files you touch. Closer docs win on local detail. No child weakens that. Re-read that chain in the current session. Do not rely on memory. Full habit: [dox.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/dox.md).

## Work

- Reproduce a bug the way an end user hits it before fixing it. A claim is not proof. Details: [verification.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/verification.md).
- Before a non-trivial edit, use codegraph when the project has an index, and name the blast radius or why you skipped it. Details: [codegraph-blast.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/codegraph-blast.md).
- Investigation is not permission to change code. Details: [scout.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/scout.md).
- Do not invent skills, slash commands, or APIs that are not installed. Ask before a large swarm. Details: [skills-honesty.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/skills-honesty.md).
- Use GitButler (`but`) for branches, commits, and pushes. In a repo not in GitButler mode, ask before `but setup` and hold branch, commit, and push work until the user answers; plain git only if they decline. Never create a native git worktree: no `git worktree add` and no harness option that isolates work in a worktree. A project contract that names plain git wins on commit tooling, never on worktrees. Details: [vcs-project-wins.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/vcs-project-wins.md).
- No Mistakes is not a requirement of every project. It applies only where this repo already ran `no-mistakes init`: `git remote` lists `no-mistakes`, or `no-mistakes axi` shows this repo. A project contract that names it counts the same. The binary being on PATH does not. If neither enrollment check holds and no project contract names No Mistakes, do not run `no-mistakes init`, do not ask, and do not hold the push. Publish with the normal path (`but push` or `git push`) and continue. When it does apply, only the outer publishing agent publishes, with `no-mistakes axi run --yes --intent "<what the user set out to accomplish>"`, never `but push` or `git push`. In a GitButler repo, stay on the workspace and pass `--branch <name>`. Do not check out that branch. Do not run `axi sync` or `--recover`. When the pipeline pushed commits, run the command No Mistakes reports: `but branch update <name>`, prefixed with `git branch --set-upstream-to=origin/<name> <name> &&` when the branch has no upstream. `--branch` exists only in the local No Mistakes fork until upstream merges it. Every `axi run` and `axi respond` carries `--yes`. Without it the run parks at the first gate and hangs. This line is the user's standing consent for `--yes` in every project that already uses No Mistakes: drive every eligible gate to an outcome without checking back. Stop and relay only what `--yes` refuses: a protected-path refusal or unvalidated Test work. A return that elapsed `--wait` is not a failure. Run the same `axi run` again to reattach. `checks-passed` is not permission to merge. A phase agent never starts, drives, or responds to a pipeline.
- Every new repo uses `master` as its default branch, never `main`. This is mandatory for every creation path: local init, `gh repo create`, the GitHub UI, or a template. For a local repo, run `git init -b master`. If GitHub created the repo with `main`, rename it to `master` before any other work. After the first push, confirm the GitHub default branch is `master`.
- Follow the project's handoff location. If it names none, use `docs/plans/handoffs/`. Never write a handoff only to `/tmp` or a harness install directory. Details: [handoffs.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/handoffs.md).
- Track tasks with the `tuxedo` CLI (the `do-todo` skill when installed). Each project's tasks live in `<repo root>/todo.txt`. `~/todo.txt` holds personal and cross-project tasks plus one `@route` line per active project that points at its local list. At the end of every turn that adds, finishes, blocks, or changes work, update the right list yourself. Use the CLI, not a TUI or background process. Every plan, spec, and handoff carries a todo.txt section, and its tasks go into the list. Details: [todo-txt.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/todo-txt.md).
- Use Recall before inventing a memory store. Details: [recall.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/recall.md).
- A skill that switches to an Empryo-native feature detects Empryo by its tools or process ancestry, never by `~/.empryo` existing. Details: [harness-detection.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/harness-detection.md).
- If the ask would delete or replace a tree it did not name, stop and confirm the exact paths. When asked to delete, use `trash`, not `rm`.

## Not here

Harness packaging, per-repo product contracts, and money or merge moves without an explicit go. Details: [out-of-scope.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/before-source/global/docs/agents/out-of-scope.md).
<!-- gap:end -->


$ ~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/gap-target sync --yes --only=policy

HOME=~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/regression-after/home JCODE_HOME='' CODEX_HOME=''

exit=1
stdout:

stderr:
JCODE_HOME is set but empty, so jcode would read prompt-overlay.md from its working folder; unset it


AFTER: empty JCODE_HOME exited 1, instructed unset it, and changed no home or working-folder files.
Evidence: Generated jcode overlay
<!-- gap:begin -->
# AGENTS.md

GAP is the global agent policy for coding agents. This file is the contract. It is not a Stow package.

The nearest project `AGENTS.md` wins on that project's local contracts. Do not create `~/AGENTS.md`: harnesses that walk parent folders would load it into every project under home.

## How this file is loaded

Edit the markdown in this repo, then run `gap sync` (install it once with `go install ./cmd/gap` from the repo root). It writes regular file copies. It does not symlink, and it does not use Stow.

- Claude reads `~/.claude/rules/global-agent-policy.md`. Do not also point `~/CLAUDE.md` here. An ancestor `CLAUDE.md` suppresses project `AGENTS.md`.
- Pi reads `~/.pi/agent/APPEND_SYSTEM.md`. Pi does not scan `rules/`. Do not add `SYSTEM.md`.
- OMP reads `~/.omp/agent/APPEND_SYSTEM.md`. Do not add `SYSTEM.md`.
- Codex gets the policy from SessionStart and SubagentStart hooks that print `gap/global-agent-policy.md` in Codex home (`~/.codex`, or `CODEX_HOME`). Old policy text may remain in that `AGENTS.md` until cleanup, so Codex can load the policy twice. Do not add `AGENTS.override.md`.
- Cursor reads `~/.cursor/rules/global-agent-policy.mdc`.
- Empryo reads `~/.empryo/EMPRYO.md`. Do not add a second copy elsewhere.
- jcode reads `~/.jcode/prompt-overlay.md` (`JCODE_HOME` when set).
- Grok loads `~/.claude/rules/*.md` when Claude compatibility is on. Do not add a second copy.

Pi packaging, themes, and footers stay in `~/.pi/agent/AGENTS.md`. Do not paste them here.

## Style

- No em dashes. Use a plain hyphen.
- Never auto-add an agent name as a commit co-author.
- Never manually edit `CHANGELOG.md` or any file marked auto-generated.
- Prefer quality and maintainability over a cheaper build.
- Meet the ask with the smallest change that works.

## Before editing

Read the root `AGENTS.md`, then every `AGENTS.md` on the path to the files you touch. Closer docs win on local detail. No child weakens that. Re-read that chain in the current session. Do not rely on memory. Full habit: [dox.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/dox.md).

## Work

- Reproduce a bug the way an end user hits it before fixing it. A claim is not proof. Details: [verification.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/verification.md).
- Before a non-trivial edit, use codegraph when the project has an index, and name the blast radius or why you skipped it. Details: [codegraph-blast.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/codegraph-blast.md).
- Investigation is not permission to change code. Details: [scout.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/scout.md).
- Do not invent skills, slash commands, or APIs that are not installed. Ask before a large swarm. Details: [skills-honesty.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/skills-honesty.md).
- Use GitButler (`but`) for branches, commits, and pushes. In a repo not in GitButler mode, ask before `but setup` and hold branch, commit, and push work until the user answers; plain git only if they decline. Never create a native git worktree: no `git worktree add` and no harness option that isolates work in a worktree. A project contract that names plain git wins on commit tooling, never on worktrees. Details: [vcs-project-wins.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/vcs-project-wins.md).
- No Mistakes is not a requirement of every project. It applies only where this repo already ran `no-mistakes init`: `git remote` lists `no-mistakes`, or `no-mistakes axi` shows this repo. A project contract that names it counts the same. The binary being on PATH does not. If neither enrollment check holds and no project contract names No Mistakes, do not run `no-mistakes init`, do not ask, and do not hold the push. Publish with the normal path (`but push` or `git push`) and continue. When it does apply, only the outer publishing agent publishes, with `no-mistakes axi run --yes --intent "<what the user set out to accomplish>"`, never `but push` or `git push`. In a GitButler repo, stay on the workspace and pass `--branch <name>`. Do not check out that branch. Do not run `axi sync` or `--recover`. When the pipeline pushed commits, run the command No Mistakes reports: `but branch update <name>`, prefixed with `git branch --set-upstream-to=origin/<name> <name> &&` when the branch has no upstream. `--branch` exists only in the local No Mistakes fork until upstream merges it. Every `axi run` and `axi respond` carries `--yes`. Without it the run parks at the first gate and hangs. This line is the user's standing consent for `--yes` in every project that already uses No Mistakes: drive every eligible gate to an outcome without checking back. Stop and relay only what `--yes` refuses: a protected-path refusal or unvalidated Test work. A return that elapsed `--wait` is not a failure. Run the same `axi run` again to reattach. `checks-passed` is not permission to merge. A phase agent never starts, drives, or responds to a pipeline.
- Every new repo uses `master` as its default branch, never `main`. This is mandatory for every creation path: local init, `gh repo create`, the GitHub UI, or a template. For a local repo, run `git init -b master`. If GitHub created the repo with `main`, rename it to `master` before any other work. After the first push, confirm the GitHub default branch is `master`.
- Follow the project's handoff location. If it names none, use `docs/plans/handoffs/`. Never write a handoff only to `/tmp` or a harness install directory. Details: [handoffs.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/handoffs.md).
- Track tasks with the `tuxedo` CLI (the `do-todo` skill when installed). Each project's tasks live in `<repo root>/todo.txt`. `~/todo.txt` holds personal and cross-project tasks plus one `@route` line per active project that points at its local list. At the end of every turn that adds, finishes, blocks, or changes work, update the right list yourself. Use the CLI, not a TUI or background process. Every plan, spec, and handoff carries a todo.txt section, and its tasks go into the list. Details: [todo-txt.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/todo-txt.md).
- Use Recall before inventing a memory store. Details: [recall.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/recall.md).
- A skill that switches to an Empryo-native feature detects Empryo by its tools or process ancestry, never by `~/.empryo` existing. Details: [harness-detection.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/harness-detection.md).
- If the ask would delete or replace a tree it did not name, stop and confirm the exact paths. When asked to delete, use `trash`, not `rm`.

## Not here

Harness packaging, per-repo product contracts, and money or merge moves without an explicit go. Details: [out-of-scope.md](~/.no-mistakes/worktrees/3daa1fd09cda/01M7BHWMSS7SVN6BTN4QZ2W8FG/.local-test-jcode/target-source/global/docs/agents/out-of-scope.md).
<!-- gap:end -->
Evidence: Validation report
GAP jcode home validation

Target: 3dfd9830ba04525956d65b171018b7967bf9a580
Regression comparison: fba4fe0, immediately before the empty-JCODE_HOME fix.

- Before: JCODE_HOME="" gap sync --yes --only=policy exited 0 and wrote the fallback ~/.jcode/prompt-overlay.md.
- After: the same command exited 1, said "unset it", and changed no home or working-folder files.
- Unset JCODE_HOME and empty CODEX_HOME published to their documented fallback homes. A second sync preserved the jcode overlay inode and modification time.
- An absolute JCODE_HOME containing spaces received the policy; sync and uninstall preserved surrounding user bytes and left the default-home overlay alone.
- Empty/relative JCODE_HOME and relative CODEX_HOME refused sync, manifest-only sync, uninstall preview, and uninstall before changing overlays or the publication ledger.
- Missing/matching jcode skill copies produced no warning. A different copy produced exactly one warning at either active home, without modifying user or managed copies, and exited 0.
- Doctor reported the installed jcode executable.
- Focused automated tests passed with inherited JCODE_HOME set to a sentinel directory; its overlay and directory metadata stayed unchanged. These are supporting tests, not live CLI scenarios.
- Manually read the changed path guidance and corrected integration plan; they describe empty JCODE_HOME refusal and retain empty CODEX_HOME as unset.

The oracle was the supplied user intent and repository public publish/uninstall contracts. Disposable source copies used the real GAP production Go code and regular local repositories so its publish gate could run normally. No GAP internals or external service were mocked in the live CLI scenarios. All subprocess exit codes were awaited. No full suite, formatter, linter, or static analysis was run. Runtime changes expose a CLI, so evidence is CLI output and persisted overlays rather than screenshots.

Cleanup verified: disposable files removed; current source remains at the target commit with no tracked or untracked changes.

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

🔧 **Review** - 1 issue found → auto-fixed ✅
  • ⚠️ docs/plans/2026-11-13-jcode-integration-plan.md:22 - The intent requires refusing a "set-but-empty JCODE_HOME" and says "docs name the difference", but this new plan instructs "an empty value means unset" here and "the same empty and relative rules as Codex" at docs/plans/2026-11-13-jcode-integration-plan.md:44. Update both instructions to match the implemented refusal; also update :24 to name TestJcodeHomeEmptyRefused, which now owns that coverage.

🔧 Fix applied.
✅ Re-checked - no issues remain.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 6 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Empty JCODE_HOME refuses sync with an “unset it” message and no writes; the preceding version reproduces the incorrect fallback publication ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/01-empty-regression.txt
Unset JCODE_HOME publishes to ~/.jcode, empty CODEX_HOME retains ~/.codex, and repeated sync preserves the overlay ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/02-default-and-codex.txt
An absolute JCODE_HOME containing spaces supports sync and uninstall while preserving surrounding user text ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/03-absolute-overlay-lifecycle.txt
Invalid home values refuse sync and uninstall, including previews, without changing overlays or publication records ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/04-invalid-home-no-side-effects.txt
Manifest sync warns once for differing jcode skill copies at either supported home and leaves all copies unchanged ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/05-shadow-copy-warnings.txt
Doctor reports the installed jcode executable ✅ pass live ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/06-doctor-jcode.txt
Focused tests preserve an inherited JCODE_HOME overlay while temporary override cases succeed ⏸️ untested no The prior payload records supporting automated tests and explicitly excludes live GAP CLI execution for this scenario. It does not establish a live result for inherited JCODE_HOME isolation.
  • python3 ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/drive-jcode.py built and exercised production GAP binaries from the target and pre-fix fba4fe0.
  • gap sync --yes --only=policy with unset, empty, absolute, and relative home values; checked generated files, ledger, and repeated-sync metadata.
  • gap sync --yes, gap sync --yes --only=manifest, gap uninstall --dry-run, and gap uninstall --yes with invalid homes; verified no persisted changes.
  • gap sync --yes --only=manifest with missing, matching, and differing jcode skill copies under default and override homes.
  • gap doctor against an isolated home.
  • go test -vet=off ./cmd/gap -count=1 -v -run &#39;^(TestJcodeHomeEmptyRefused|TestJcodeOverlay|TestResolveCodexHome|TestInheritedJcodeHomeIsolation|TestHarnessHomeValidation|TestJcodeSyncAndUninstall|TestShadowJcode)$&#39; with an inherited sentinel JCODE_HOME.
  • Manually checked changed home-path documentation and integration-plan corrections; verified fixture cleanup and unchanged target source.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

- Add jcode to the harness table: ~/.jcode/prompt-overlay.md, or JCODE_HOME when set
- Share CODEX_HOME's rules: empty means unset, a relative path stops the sync
- Warn when ~/.jcode/skills/<name> differs from the managed skill, beside the Empryo warning
- List jcode in gap doctor's harness check
- Name jcode in the destination docs and stop calling ~/AGENTS.md a pointer
- Add the jcode integration plan

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

jcode's actual home-resolution behavior differs from the integration's assumptions: an empty override misses the policy, and a custom override makes the skill warning compare the wrong shared directory.

Reviewed changes Reviewed the complete jcode integration, surrounding publication/removal paths, and upstream jcode contracts; go test ./... and focused regression tests pass.

  • Policy delivery: Adds the jcode overlay to marked-block publication and uninstall, with custom-home resolution and early validation.
  • Skill diagnostics: Adds read-only jcode skill-copy warnings while retaining Empryo's existing drift behavior.
  • Regression coverage: Adds overlay, home-validation, uninstall, and warning tests, and isolates inherited JCODE_HOME in the test suite.
  • Doctor and documentation: Lists jcode in doctor, documents destinations, and leaves machine cleanup and live prompt verification for after merge.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

Comment thread cmd/gap/harness.go Resolved
Comment thread cmd/gap/skills.go Resolved
…copies; updated the regression assertion and docs. The regression failed before the fix, and go test ./... now passes. Approval remains unresolved: Pullfrog’s empty-JCODE_HOME recommendation conflicts with the required empty=unset behavior, which was preserved. See [upstream behavior](https://github.com/1jehuang/jcode/blob/v0.99.1/crates/jcode-storage/src/lib.rs#L163-L170)

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

No new issues found in this delta. Approval remains withheld on the existing empty-JCODE_HOME policy-delivery finding, which is unchanged.

Reviewed changes Reviewed fed3957..fba4fe0; focused jcode and Empryo regressions passed.

  • Corrected diagnostics. Removed the claim that jcode loads both compared skill copies.
  • Strengthened regression coverage. Required the exact, factual warning text.
  • Aligned documentation. Described copy differences without asserting shared discovery paths.

Pullfrog  | Fix it ➔ | View workflow run | Using gpt-6.1-sol | 𝕏

- jcode 0.99.1 reads JCODE_HOME='' as an empty path and loads prompt-overlay.md from its working folder
- Stop the sync with an unset-it message instead of publishing to ~/.jcode
- Keep CODEX_HOME's empty-means-unset rule
- Tests unset JCODE_HOME instead of setting it empty, and cover the refusal
- Docs name the difference

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes Reviewed fba4fe0..87db763; go test ./... passed.

  • Fixed empty-home handling. Rejected explicitly empty JCODE_HOME before policy publication or uninstall while preserving empty CODEX_HOME behavior.
  • Updated regression coverage. Distinguished unset from empty overrides and kept default-home tests genuinely unset.
  • Aligned documentation. Corrected destination rules, integration-plan references, and warning implementation details.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@edheltzel
edheltzel merged commit 87e11d5 into master Nov 13, 2026
3 checks passed
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