fix(cli): write GRAPH.* into the scanned project, not cwd - #8
Merged
Conversation
Without -o the CLI used Path.cwd(), so running graphlm from another directory dropped output next to the tool. Default destination is now the project being analyzed; -o still overrides. Co-Authored-By: Grok 4.6 <grok@x.ai>
ggrace519
added a commit
that referenced
this pull request
Aug 30, 2026
Delete leftover tool output that predates the GRAPH.* output rename (#7/#8): graphs.md, graphs.json, and the untracked graph.html, plus the committed .coverage sqlite database. None of these are inputs to the build, tests, or docs — they were graphLM's own output committed by accident. Add .coverage, coverage.xml, and the GRAPH.* output files to .gitignore so generated artifacts no longer drift back into version control. Claude-Session: https://claude.ai/code/session_01SLftfcgzQfsWHbuA4XHv1F Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Aug 30, 2026
ggrace519
added a commit
that referenced
this pull request
Aug 30, 2026
Design-only scoping of the graph-vs-graph diff artifact (self-refreshing graph fast-follow). Building stays gated; no code in this change. ADR-002 settles the decisions the plan left open, grounded against the merged code: - The diff runs in write_outputs (the only place with both graph and output dir, since the CLI passes output_dir=None to generate_graph — the #8 split); baseline GRAPH.json is read before the overwrite; --dry-run writes no diff. - Added/removed only, no "changed" bucket — identity keys are structural, so LLM-regenerated prose is intentionally invisible (a changed bucket over free text would drown the structural signal in nondeterminism). Named deliberate. - Three baseline states, not two: first-run, uncomparable (corrupt / unknown schema_version), normal — a corrupt file must not masquerade as first-run. - deterministic_edges None (--no-ast) vs [] distinguished, so toggling --no-ast never reports a mass edge deletion. - Artifact: GRAPH_DIFF.md + .json, own diff_schema_version, SHA-range header, *_suffix convention, on-by-default with --no-diff, no HTML in cut one. - write_outputs signature must stay non-breaking for its ~10 positional callers. Also points ADR-001's fast-follow note and the plan doc at ADR-002 / #28. Refs #28 Claude-Session: https://claude.ai/code/session_01SLftfcgzQfsWHbuA4XHv1F Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Without
-o, the CLI wroteGRAPH.md/GRAPH.json/GRAPH.htmlinto the process working directory. Runninggraphlm /path/to/projectfrom another folder therefore dropped files next to the tool instead of next to the code being analyzed.What changed and why
-o/--output-dirstill overrides.generate_graphonly writes whenoutput_diris passed.Verification
uv run pytest— 261 passed-ooverrides; cwd is not usedPost-merge
graphlm /path/to/projectwrites into/path/to/project/.