Add --no-context-files (-nc) flag to skip AGENTS.md / CLAUDE.md loading
Summary
Add a CLI flag that disables automatic loading of AGENTS.md / CLAUDE.md / JCODE.md context files at session start. Useful for: scripts that want a clean baseline, evaluations, reproducing user-reported bugs without their local context, and CI smoke tests.
Reference: pi --no-context-files / -nc.
Why
- Today every session inherits whatever
AGENTS.md chain the cwd produces. Reproducing a bug means temporarily renaming files — error-prone.
- Required for sound benchmarks of "core jcode behavior" without project-specific overrides.
- Small, isolated change with no behavioral impact when not set.
Current state in jcode
- jcode loads
AGENTS.md automatically (this very repo's AGENTS.md is consumed every session). No flag turns it off.
- Grep finds no
no_context_files, no-context-files, skip_agents_md.
Implementation checklist
1. CLI flag
2. Env var
3. Settings
4. UX
Testing
Unit
Manual smoke
Acceptance criteria
- Flag works for
jcode, jcode run, jcode serve/connect.
- Documented in
--help and README.md.
- Single-line log entry confirms the flag took effect.
References
Implementation notes addendum (Devin gap-analysis pass, 2026-05-21)
Status
Verified jcode code paths
Acceptance criteria (carry-over from issue #9 original spec; restated for clarity)
- Both
--no-context-files and JCODE_NO_CONTEXT_FILES=1 work (CLI flag overrides env which overrides settings).
- A single log line
Context files disabled (--no-context-files) is emitted on session start when active.
- Settings supports
loadContextFiles: bool = true.
--no-context-files works for jcode, jcode run, jcode serve/connect.
- README and
--help updated.
- Unit tests cover both flag and env-var paths.
Cross-references
Add
--no-context-files(-nc) flag to skip AGENTS.md / CLAUDE.md loadingSummary
Add a CLI flag that disables automatic loading of
AGENTS.md/CLAUDE.md/JCODE.mdcontext files at session start. Useful for: scripts that want a clean baseline, evaluations, reproducing user-reported bugs without their local context, and CI smoke tests.Reference: pi
--no-context-files/-nc.Why
AGENTS.mdchain the cwd produces. Reproducing a bug means temporarily renaming files — error-prone.Current state in jcode
AGENTS.mdautomatically (this very repo'sAGENTS.mdis consumed every session). No flag turns it off.no_context_files,no-context-files,skip_agents_md.Implementation checklist
1. CLI flag
src/cli/args.rs:-ncdirectly is two chars, so prefer the long form.)src/prompt.rsand/or wherever AGENTS.md is consumed).2. Env var
JCODE_NO_CONTEXT_FILES=1as an alternate path for scripts.3. Settings
loadContextFiles: bool = truesetting in the user/project config so it can be permanently off in CI environments.4. UX
Context files disabled (--no-context-files). This is critical so users don't get confused why behavior changed.Testing
Unit
Manual smoke
jcode --no-context-files run "What's in AGENTS.md?"— agent has no auto-loaded knowledge of it.Acceptance criteria
jcode,jcode run,jcode serve/connect.--helpandREADME.md.References
--no-context-files.Implementation notes addendum (Devin gap-analysis pass, 2026-05-21)
Status
--no-context-filesfield toArgsbut never reads it — the actual gating is done via env vars. The CLI flag is therefore a no-op. See the review comment for the minimal fix (translate the flag → env var incli/startup.rs, the wayargs.traceis handled today).Verified jcode code paths
src/cli/args.rs(already has the field as of PR feat(cli): add --no-context-files / -c flag to skip AGENTS.md and CLAUDE.md context loading #21).src/cli/startup.rsparse_and_prepare_args()— see howargs.traceis translated toJCODE_TRACE.load_agents_md_files_from_dir()insrc/prompt.rs.~/.jcode/config.tomlviasrc/config.rs.Acceptance criteria (carry-over from issue #9 original spec; restated for clarity)
--no-context-filesandJCODE_NO_CONTEXT_FILES=1work (CLI flag overrides env which overrides settings).Context files disabled (--no-context-files)is emitted on session start when active.loadContextFiles: bool = true.--no-context-filesworks forjcode,jcode run,jcode serve/connect.--helpupdated.Cross-references
/settingsUI for config inspection and edits #7/settings—loadContextFilesis a field the settings UI should expose.