Repository navigation
feat(gap): add jcode policy overlay integration - #121
Conversation
- 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
There was a problem hiding this comment.
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_HOMEin the test suite. - Doctor and documentation: Lists jcode in doctor, documents destinations, and leaves machine cleanup and live prompt verification for after merge.
gpt-6.1-sol | 𝕏
…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)
There was a problem hiding this comment.
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.
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
… in integration plan
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes Reviewed fba4fe0..87db763; go test ./... passed.
- Fixed empty-home handling. Rejected explicitly empty
JCODE_HOMEbefore policy publication or uninstall while preserving emptyCODEX_HOMEbehavior. - 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.
gpt-6.1-sol | 𝕏

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
JCODE_HOMEoverrides; reject relative paths and set-but-empty values, with an “unset it” message for empty values. Keep emptyCODEX_HOMEequivalent to unset.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.
Evidence: Before-and-after CLI regression
Evidence: Generated jcode overlay
Evidence: Validation report
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.
python3 ~/.no-mistakes/evidence/01M7BHWMSS7SVN6BTN4QZ2W8FG/drive-jcode.pybuilt and exercised production GAP binaries from the target and pre-fix fba4fe0.gap sync --yes --only=policywith 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, andgap uninstall --yeswith invalid homes; verified no persisted changes.gap sync --yes --only=manifestwith missing, matching, and differing jcode skill copies under default and override homes.gap doctoragainst an isolated home.go test -vet=off ./cmd/gap -count=1 -v -run '^(TestJcodeHomeEmptyRefused|TestJcodeOverlay|TestResolveCodexHome|TestInheritedJcodeHomeIsolation|TestHarnessHomeValidation|TestJcodeSyncAndUninstall|TestShadowJcode)$'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.