MertCapkin-GraphStack 4.5.3__tar.gz → 4.5.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mertcapkin_graphstack-4.5.3/scripts/MertCapkin_GraphStack.egg-info → mertcapkin_graphstack-4.5.5}/PKG-INFO +1 -1
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/pyproject.toml +1 -1
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5/scripts/MertCapkin_GraphStack.egg-info}/PKG-INFO +1 -1
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/__init__.py +1 -1
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__pycache__/__init__.cpython-311.pyc +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__pycache__/base.cpython-311.pyc +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__pycache__/generic.cpython-311.pyc +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__pycache__/git.cpython-311.pyc +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__pycache__/registry.cpython-311.pyc +0 -0
- mertcapkin_graphstack-4.5.5/scripts/graphstack/init_cmd.py +124 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_init.py +25 -3
- mertcapkin_graphstack-4.5.3/scripts/graphstack/init_cmd.py +0 -113
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/LICENSE +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/MANIFEST.in +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/README.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/MertCapkin_GraphStack.egg-info/SOURCES.txt +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/MertCapkin_GraphStack.egg-info/dependency_links.txt +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/MertCapkin_GraphStack.egg-info/entry_points.txt +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/MertCapkin_GraphStack.egg-info/requires.txt +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/MertCapkin_GraphStack.egg-info/top_level.txt +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/__main__.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/commands/graphstack.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/rules/graphstack.mdc +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/skills/architect/ARCHITECT.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/skills/bootstrapper/BOOTSTRAPPER.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/skills/builder/BUILDER.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/skills/qa/QA.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/skills/reviewer/REVIEWER.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.cursor/skills/ship/SHIP.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/.graphstack-assets-version +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/docs/CURSOR_PROMPTS.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/handoff/BOOTSTRAP.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/handoff/BRIEF.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/handoff/REVIEW.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/handoff/board/README.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/orchestrator/ORCHESTRATOR.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/orchestrator/TOKEN_OPTIMIZER.md +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/scripts/board.ps1 +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/scripts/board.sh +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/scripts/gate-hook.ps1 +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/scripts/gate-hook.sh +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/scripts/post-commit +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/assets/scripts/post-commit.ps1 +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/board.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/bootstrap.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/cli.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__init__.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/base.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/generic.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/git.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/registry.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/constants.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/gate.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/graph.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/hook.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/installer.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/platform_utils.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/run.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/state.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/__init__.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/conftest.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_assets.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_board.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_compact.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_gate.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_graph.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_hook.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_installer.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_platform_utils.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_state.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_validate.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/validate.py +0 -0
- {mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/setup.cfg +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "MertCapkin_GraphStack"
|
|
7
|
-
version = "4.5.
|
|
7
|
+
version = "4.5.5"
|
|
8
8
|
description = "Graph-first AI development workflow — board, gate, graph queries, one-shot init"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"""One-shot project bootstrap: install GraphStack + refresh graph + health check.
|
|
2
|
+
|
|
3
|
+
Replaces the manual four-step onboarding (install → graphify → doctor → hooks)
|
|
4
|
+
with a single command for new or existing target projects.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import os
|
|
11
|
+
import sys
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
from .bootstrap import ensure_graphify, run_graphify_cursor_install
|
|
15
|
+
from .graph import run_update as graph_update
|
|
16
|
+
from .installer import install
|
|
17
|
+
from .platform_utils import echo, graphify_available
|
|
18
|
+
from .validate import run_doctor
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def run(argv: list[str]) -> int:
|
|
22
|
+
parser = argparse.ArgumentParser(
|
|
23
|
+
prog="graphstack init",
|
|
24
|
+
description="Install GraphStack into a project, refresh the code graph, run doctor.",
|
|
25
|
+
)
|
|
26
|
+
parser.add_argument(
|
|
27
|
+
"target",
|
|
28
|
+
nargs="?",
|
|
29
|
+
default=".",
|
|
30
|
+
help="Target project root (default: current directory).",
|
|
31
|
+
)
|
|
32
|
+
parser.add_argument(
|
|
33
|
+
"-y", "--non-interactive",
|
|
34
|
+
action="store_true",
|
|
35
|
+
help="Skip interactive install prompts (CI-friendly).",
|
|
36
|
+
)
|
|
37
|
+
parser.add_argument(
|
|
38
|
+
"--skip-graph",
|
|
39
|
+
action="store_true",
|
|
40
|
+
help="Skip graphify update even when graphify is installed.",
|
|
41
|
+
)
|
|
42
|
+
parser.add_argument(
|
|
43
|
+
"--install-deps",
|
|
44
|
+
action="store_true",
|
|
45
|
+
help="pip install graphifyy if missing; run graphify cursor install.",
|
|
46
|
+
)
|
|
47
|
+
args = parser.parse_args(argv)
|
|
48
|
+
target = Path(args.target).resolve()
|
|
49
|
+
|
|
50
|
+
echo("")
|
|
51
|
+
echo("GraphStack init")
|
|
52
|
+
echo("===============")
|
|
53
|
+
echo(f"Target: {target}")
|
|
54
|
+
echo("")
|
|
55
|
+
|
|
56
|
+
if args.install_deps:
|
|
57
|
+
if not ensure_graphify(install=True):
|
|
58
|
+
echo("Warning: could not install graphify — continue without graph refresh.")
|
|
59
|
+
|
|
60
|
+
rc = install(target, non_interactive=args.non_interactive)
|
|
61
|
+
if rc != 0:
|
|
62
|
+
return rc
|
|
63
|
+
|
|
64
|
+
if args.install_deps and graphify_available():
|
|
65
|
+
echo("")
|
|
66
|
+
echo("Registering Graphify in Cursor (.cursor/rules)...")
|
|
67
|
+
cursor_rc = run_graphify_cursor_install()
|
|
68
|
+
if cursor_rc != 0:
|
|
69
|
+
echo("Warning: graphify cursor install failed — run manually: graphify cursor install")
|
|
70
|
+
|
|
71
|
+
if not args.skip_graph and graphify_available():
|
|
72
|
+
echo("")
|
|
73
|
+
echo("Refreshing code graph (AST-only, no API cost)...")
|
|
74
|
+
prev = Path.cwd()
|
|
75
|
+
try:
|
|
76
|
+
os.chdir(target)
|
|
77
|
+
graph_rc = graph_update(["."])
|
|
78
|
+
finally:
|
|
79
|
+
os.chdir(prev)
|
|
80
|
+
if graph_rc != 0:
|
|
81
|
+
echo("Warning: graph update failed — run manually: graphify update .")
|
|
82
|
+
elif not args.skip_graph:
|
|
83
|
+
echo("")
|
|
84
|
+
echo("Skipping graph update (graphify not on PATH).")
|
|
85
|
+
if not args.install_deps:
|
|
86
|
+
echo(" Tip: re-run with --install-deps or: pip install \"graphifyy>=0.7,<0.9\"")
|
|
87
|
+
|
|
88
|
+
echo("")
|
|
89
|
+
echo("Health check:")
|
|
90
|
+
prev = Path.cwd()
|
|
91
|
+
try:
|
|
92
|
+
os.chdir(target)
|
|
93
|
+
doctor_rc = run_doctor([])
|
|
94
|
+
finally:
|
|
95
|
+
os.chdir(prev)
|
|
96
|
+
|
|
97
|
+
graph_report = target / "graphify-out" / "GRAPH_REPORT.md"
|
|
98
|
+
echo("")
|
|
99
|
+
if graph_report.is_file():
|
|
100
|
+
echo("Ready. Describe your task in Cursor — GraphStack rules load automatically.")
|
|
101
|
+
echo(" graph query: python -m graphstack graph query \"your question\"")
|
|
102
|
+
else:
|
|
103
|
+
echo("Next: build the full knowledge graph in Cursor chat → /graphify .")
|
|
104
|
+
echo(" (code-only graph: graphstack graph update .)")
|
|
105
|
+
echo(" process gate: python -m graphstack gate check")
|
|
106
|
+
echo("")
|
|
107
|
+
|
|
108
|
+
rule_file = target / ".cursor" / "rules" / "graphstack.mdc"
|
|
109
|
+
if not rule_file.is_file():
|
|
110
|
+
echo("Error: install finished but .cursor/rules/graphstack.mdc is missing.")
|
|
111
|
+
echo(' pip install -U --force-reinstall "MertCapkin_GraphStack[graphify]"')
|
|
112
|
+
echo(" graphstack init . -y --install-deps")
|
|
113
|
+
return 1
|
|
114
|
+
|
|
115
|
+
if doctor_rc != 0:
|
|
116
|
+
echo("Note: doctor reported issues above; core GraphStack files are installed.")
|
|
117
|
+
return 0
|
|
118
|
+
|
|
119
|
+
return 0
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
if __name__ == "__main__":
|
|
123
|
+
sys.exit(run(sys.argv[1:]))
|
|
124
|
+
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_init.py
RENAMED
|
@@ -15,18 +15,23 @@ def test_init_runs_install_graph_and_doctor(
|
|
|
15
15
|
) -> None:
|
|
16
16
|
target = tmp_path / "proj"
|
|
17
17
|
target.mkdir()
|
|
18
|
+
rule = target / ".cursor" / "rules" / "graphstack.mdc"
|
|
19
|
+
rule.parent.mkdir(parents=True)
|
|
20
|
+
|
|
21
|
+
def _install(t: Path, *, non_interactive: bool = False) -> int:
|
|
22
|
+
rule.write_text("rules", encoding="utf-8")
|
|
23
|
+
return 0
|
|
18
24
|
|
|
19
|
-
install_mock = MagicMock(return_value=0)
|
|
20
25
|
graph_mock = MagicMock(return_value=0)
|
|
21
26
|
doctor_mock = MagicMock(return_value=0)
|
|
22
27
|
|
|
23
|
-
monkeypatch.setattr(init_cmd, "install",
|
|
28
|
+
monkeypatch.setattr(init_cmd, "install", _install)
|
|
24
29
|
monkeypatch.setattr(init_cmd, "graph_update", graph_mock)
|
|
25
30
|
monkeypatch.setattr(init_cmd, "run_doctor", doctor_mock)
|
|
26
31
|
monkeypatch.setattr(init_cmd, "graphify_available", lambda: True)
|
|
27
32
|
|
|
28
33
|
assert init_cmd.run([str(target), "-y"]) == 0
|
|
29
|
-
|
|
34
|
+
assert rule.is_file()
|
|
30
35
|
graph_mock.assert_called_once_with(["."])
|
|
31
36
|
doctor_mock.assert_called_once()
|
|
32
37
|
|
|
@@ -56,3 +61,20 @@ def test_init_propagates_install_failure(
|
|
|
56
61
|
monkeypatch.setattr(init_cmd, "graph_update", MagicMock())
|
|
57
62
|
monkeypatch.setattr(init_cmd, "run_doctor", MagicMock())
|
|
58
63
|
assert init_cmd.run([str(target), "-y"]) == 1
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def test_init_succeeds_when_doctor_fails_but_layout_ok(
|
|
67
|
+
tmp_path: Path, monkeypatch: pytest.MonkeyPatch,
|
|
68
|
+
) -> None:
|
|
69
|
+
target = tmp_path / "proj"
|
|
70
|
+
target.mkdir()
|
|
71
|
+
rule = target / ".cursor" / "rules" / "graphstack.mdc"
|
|
72
|
+
rule.parent.mkdir(parents=True)
|
|
73
|
+
rule.write_text("rules", encoding="utf-8")
|
|
74
|
+
|
|
75
|
+
monkeypatch.setattr(init_cmd, "install", MagicMock(return_value=0))
|
|
76
|
+
monkeypatch.setattr(init_cmd, "graph_update", MagicMock(return_value=0))
|
|
77
|
+
monkeypatch.setattr(init_cmd, "run_doctor", MagicMock(return_value=1))
|
|
78
|
+
monkeypatch.setattr(init_cmd, "graphify_available", lambda: False)
|
|
79
|
+
|
|
80
|
+
assert init_cmd.run([str(target), "-y", "--skip-graph"]) == 0
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"""One-shot project bootstrap: install GraphStack + refresh graph + health check.
|
|
2
|
-
|
|
3
|
-
Replaces the manual four-step onboarding (install → graphify → doctor → hooks)
|
|
4
|
-
with a single command for new or existing target projects.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
import argparse
|
|
10
|
-
import os
|
|
11
|
-
import sys
|
|
12
|
-
from pathlib import Path
|
|
13
|
-
|
|
14
|
-
from .bootstrap import ensure_graphify, run_graphify_cursor_install
|
|
15
|
-
from .graph import run_update as graph_update
|
|
16
|
-
from .installer import install
|
|
17
|
-
from .platform_utils import echo, graphify_available
|
|
18
|
-
from .validate import run_doctor
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def run(argv: list[str]) -> int:
|
|
22
|
-
parser = argparse.ArgumentParser(
|
|
23
|
-
prog="graphstack init",
|
|
24
|
-
description="Install GraphStack into a project, refresh the code graph, run doctor.",
|
|
25
|
-
)
|
|
26
|
-
parser.add_argument(
|
|
27
|
-
"target",
|
|
28
|
-
nargs="?",
|
|
29
|
-
default=".",
|
|
30
|
-
help="Target project root (default: current directory).",
|
|
31
|
-
)
|
|
32
|
-
parser.add_argument(
|
|
33
|
-
"-y", "--non-interactive",
|
|
34
|
-
action="store_true",
|
|
35
|
-
help="Skip interactive install prompts (CI-friendly).",
|
|
36
|
-
)
|
|
37
|
-
parser.add_argument(
|
|
38
|
-
"--skip-graph",
|
|
39
|
-
action="store_true",
|
|
40
|
-
help="Skip graphify update even when graphify is installed.",
|
|
41
|
-
)
|
|
42
|
-
parser.add_argument(
|
|
43
|
-
"--install-deps",
|
|
44
|
-
action="store_true",
|
|
45
|
-
help="pip install graphifyy if missing; run graphify cursor install.",
|
|
46
|
-
)
|
|
47
|
-
args = parser.parse_args(argv)
|
|
48
|
-
target = Path(args.target).resolve()
|
|
49
|
-
|
|
50
|
-
echo("")
|
|
51
|
-
echo("GraphStack init")
|
|
52
|
-
echo("===============")
|
|
53
|
-
echo(f"Target: {target}")
|
|
54
|
-
echo("")
|
|
55
|
-
|
|
56
|
-
if args.install_deps:
|
|
57
|
-
if not ensure_graphify(install=True):
|
|
58
|
-
echo("Warning: could not install graphify — continue without graph refresh.")
|
|
59
|
-
|
|
60
|
-
rc = install(target, non_interactive=args.non_interactive)
|
|
61
|
-
if rc != 0:
|
|
62
|
-
return rc
|
|
63
|
-
|
|
64
|
-
if args.install_deps and graphify_available():
|
|
65
|
-
echo("")
|
|
66
|
-
echo("Registering Graphify in Cursor (.cursor/rules)...")
|
|
67
|
-
cursor_rc = run_graphify_cursor_install()
|
|
68
|
-
if cursor_rc != 0:
|
|
69
|
-
echo("Warning: graphify cursor install failed — run manually: graphify cursor install")
|
|
70
|
-
|
|
71
|
-
if not args.skip_graph and graphify_available():
|
|
72
|
-
echo("")
|
|
73
|
-
echo("Refreshing code graph (AST-only, no API cost)...")
|
|
74
|
-
prev = Path.cwd()
|
|
75
|
-
try:
|
|
76
|
-
os.chdir(target)
|
|
77
|
-
graph_rc = graph_update(["."])
|
|
78
|
-
finally:
|
|
79
|
-
os.chdir(prev)
|
|
80
|
-
if graph_rc != 0:
|
|
81
|
-
echo("Warning: graph update failed — run manually: graphify update .")
|
|
82
|
-
elif not args.skip_graph:
|
|
83
|
-
echo("")
|
|
84
|
-
echo("Skipping graph update (graphify not on PATH).")
|
|
85
|
-
if not args.install_deps:
|
|
86
|
-
echo(" Tip: re-run with --install-deps or: pip install \"graphifyy>=0.7,<0.9\"")
|
|
87
|
-
|
|
88
|
-
echo("")
|
|
89
|
-
echo("Health check:")
|
|
90
|
-
prev = Path.cwd()
|
|
91
|
-
try:
|
|
92
|
-
os.chdir(target)
|
|
93
|
-
doctor_rc = run_doctor([])
|
|
94
|
-
finally:
|
|
95
|
-
os.chdir(prev)
|
|
96
|
-
|
|
97
|
-
graph_report = target / "graphify-out" / "GRAPH_REPORT.md"
|
|
98
|
-
echo("")
|
|
99
|
-
if graph_report.is_file():
|
|
100
|
-
echo("Ready. Describe your task in Cursor — GraphStack rules load automatically.")
|
|
101
|
-
echo(" graph query: python -m graphstack graph query \"your question\"")
|
|
102
|
-
else:
|
|
103
|
-
echo("Next: build the full knowledge graph in Cursor chat → /graphify .")
|
|
104
|
-
echo(" (code-only graph: graphstack graph update .)")
|
|
105
|
-
echo(" process gate: python -m graphstack gate check")
|
|
106
|
-
echo("")
|
|
107
|
-
|
|
108
|
-
return doctor_rc
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
if __name__ == "__main__":
|
|
112
|
-
sys.exit(run(sys.argv[1:]))
|
|
113
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/__init__.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/base.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/generic.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/git.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/compact/registry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/platform_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/__init__.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/conftest.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_assets.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_board.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_compact.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_gate.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_graph.py
RENAMED
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_hook.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mertcapkin_graphstack-4.5.3 → mertcapkin_graphstack-4.5.5}/scripts/graphstack/tests/test_state.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|