Skip to content

Commit be000ae

Browse files
committed
fix(cli): drop unimplemented --brief/--fields/--count/--exists; fix install --verbose mock (final review)
- Remove four unimplemented flags (--brief, --fields, --count, --exists) from the common parent parser in jrag.py. These flags were registered but never read by any handler, violating the "inapplicable flags never silently ignored" principle. - Remove references to these flags from skills/explore-codebase-cli/SKILL.md and agents/explorer-rag-cli.md documentation. - Fix test_cmd_install_forwards_verbose_flag mock signature to accept surface="mcp" (matching run_install's new signature from PR-5), and assert the default forwarding. - Run sync_agent_artifacts.py to propagate documentation changes to install_data. Fixes #END_OF_PLAN_FULL_SUITE
1 parent ca7a73d commit be000ae

6 files changed

Lines changed: 3 additions & 32 deletions

File tree

agents/explorer-rag-cli.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ Run `jrag --help` for the canonical list. Groups:
5656
--module <name> Filter by module
5757
--limit <N> Cap on results (default 20; 10 for fan-out commands)
5858
--format text|json Output format (default: text)
59-
--brief Compact output
60-
--fields a,b,c Field allowlist
61-
--count Return only the count
62-
--exists Return only an exists boolean (exit 0/2)
6359
--index-dir <path> Index directory override
6460
```
6561

java_codebase_rag/install_data/agents/explorer-rag-cli.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ Run `jrag --help` for the canonical list. Groups:
5656
--module <name> Filter by module
5757
--limit <N> Cap on results (default 20; 10 for fan-out commands)
5858
--format text|json Output format (default: text)
59-
--brief Compact output
60-
--fields a,b,c Field allowlist
61-
--count Return only the count
62-
--exists Return only an exists boolean (exit 0/2)
6359
--index-dir <path> Index directory override
6460
```
6561

java_codebase_rag/install_data/skills/explore-codebase-cli/SKILL.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ Run `jrag --help` for the canonical list. Groups (PR-JRAG-1a..4):
6262
--module <name> Filter by module
6363
--limit <N> Cap on results (default 20; 10 for fan-out commands)
6464
--format text|json Output format (default: text)
65-
--brief Compact output (fewer fields per node)
66-
--fields a,b,c Field allowlist for node projections
67-
--count Return only the count (no node rows)
68-
--exists Return only an exists boolean (exit 0/2)
6965
--index-dir <path> Index directory override (default: discovered from cwd)
7066
```
7167

java_codebase_rag/jrag.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,6 @@ def build_parser() -> argparse.ArgumentParser:
154154
default="text",
155155
help="Output format (default: text).",
156156
)
157-
common.add_argument(
158-
"--brief", action="store_true", help="Compact output (fewer fields per node)."
159-
)
160-
common.add_argument(
161-
"--fields",
162-
type=str,
163-
default=None,
164-
help="Comma-separated field allowlist for node projections.",
165-
)
166-
common.add_argument(
167-
"--count", action="store_true", help="Return only the count (no node rows)."
168-
)
169-
common.add_argument(
170-
"--exists", action="store_true", help="Return only an exists boolean (exit 0/2)."
171-
)
172157

173158
status = subparsers.add_parser(
174159
"status",

skills/explore-codebase-cli/SKILL.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ Run `jrag --help` for the canonical list. Groups (PR-JRAG-1a..4):
6262
--module <name> Filter by module
6363
--limit <N> Cap on results (default 20; 10 for fan-out commands)
6464
--format text|json Output format (default: text)
65-
--brief Compact output (fewer fields per node)
66-
--fields a,b,c Field allowlist for node projections
67-
--count Return only the count (no node rows)
68-
--exists Return only an exists boolean (exit 0/2)
6965
--index-dir <path> Index directory override (default: discovered from cwd)
7066
```
7167

tests/test_java_codebase_rag_cli.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1511,10 +1511,11 @@ def test_cmd_install_forwards_verbose_flag(
15111511
captured: dict = {}
15121512

15131513
def _fake_run_install(*, non_interactive, agents, scope, model,
1514-
source_root=None, quiet=False, verbose=False):
1514+
source_root=None, quiet=False, verbose=False, surface="mcp"):
15151515
captured["quiet"] = quiet
15161516
captured["verbose"] = verbose
15171517
captured["non_interactive"] = non_interactive
1518+
captured["surface"] = surface
15181519
return 0
15191520

15201521
monkeypatch.setattr(_installer, "run_install", _fake_run_install)
@@ -1525,6 +1526,7 @@ def _fake_run_install(*, non_interactive, agents, scope, model,
15251526
)
15261527
assert rc == 0
15271528
assert captured["verbose"] is True
1529+
assert captured["surface"] == "mcp"
15281530
# quiet still flows through too.
15291531
rc2 = cli_mod.main(
15301532
["install", "--non-interactive", "--agent", "claude-code", "--quiet"]

0 commit comments

Comments
 (0)