fix(graphify): translate issue-flow build to a real graphify subcommand#51
Merged
Conversation
…mand `graphify` is dispatch-based — every action is a subcommand (`extract <path>`, `update <path>`, `watch <path>`, …). The original integration emitted `graphify <project_root>` with no subcommand, so every `issue-flow build` (and the `/build` slash command) failed with `error: unknown command '<path>'`. The scaffolded docs also advertised flags (`--update`, `--no-viz`, `--mode deep`, `--cluster-only`, `--watch`) that do not exist on graphify; they are subcommands or per-subcommand flags. Changes: - `_build_graphify_argv` constructs `graphify <subcommand> <path> [args]`. Default subcommand is `extract` (full AST + semantic LLM build); a leading recognized build subcommand (`extract`, `update`, `watch`, `cluster-only`, `check-update`) overrides it. Project root is injected after the subcommand unless the user supplied a positional path, in which case it is trusted. - `cli.build` converts `project_dir` from a positional to `-C` / `--project-dir`, modeled on `git -C`. The previous positional ate args like `update` (`issue-flow build update` failed because Typer bound `update` to `project_dir` and the existence check rejected it). - Update build template, rules entry, cursor-issue-workflow doc, issue-close template, build skill, and README to describe real graphify subcommands and the new `-C` flag. Replace every `graphify .` fallback (which was never valid) with `graphify extract .`. - New tests cover argv construction across no-args, leading subcommand, leading flag, and explicit-path cases. Existing `subprocess.run`-mocked tests are updated to the new `-C` shape and also patch `_candidate_install_locations` so the install-hint branch is exercised on machines that already have graphify on disk. - Add a "Correction" section to `.issueflows/04-designs-and-guides/graphify-integration.md` so the next reader sees that graphify is subcommand-based and that future integrations should test against real subcommand names. Co-authored-by: Cursor <cursoragent@cursor.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.
graphifyis dispatch-based — every action is a subcommand(
extract <path>,update <path>,watch <path>, …). The originalintegration emitted
graphify <project_root>with no subcommand, soevery
issue-flow build(and the/buildslash command) failed witherror: unknown command '<path>'. The scaffolded docs also advertisedflags (
--update,--no-viz,--mode deep,--cluster-only,--watch) that do not exist on graphify; they are subcommands orper-subcommand flags.
Changes:
_build_graphify_argvconstructsgraphify <subcommand> <path> [args].Default subcommand is
extract(full AST + semantic LLM build);a leading recognized build subcommand (
extract,update,watch,cluster-only,check-update) overrides it. Project root isinjected after the subcommand unless the user supplied a positional
path, in which case it is trusted.
cli.buildconvertsproject_dirfrom a positional to-C/--project-dir, modeled ongit -C. The previous positional ateargs like
update(issue-flow build updatefailed because Typerbound
updatetoproject_dirand the existence check rejected it).issue-close template, build skill, and README to describe real
graphify subcommands and the new
-Cflag. Replace everygraphify .fallback (which was never valid) withgraphify extract ..subcommand, leading flag, and explicit-path cases. Existing
subprocess.run-mocked tests are updated to the new-Cshape andalso patch
_candidate_install_locationsso the install-hintbranch is exercised on machines that already have graphify on disk.
.issueflows/04-designs-and-guides/graphify-integration.mdso thenext reader sees that graphify is subcommand-based and that future
integrations should test against real subcommand names.
Co-authored-by: Cursor cursoragent@cursor.com