Skip to content

Commit 717fa60

Browse files
Fix graph staleness check (HEAD~1) and sync graphify-out for v4.1.0
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 68d5e32 commit 717fa60

7 files changed

Lines changed: 452 additions & 247 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ All notable changes to GraphStack are documented here.
1313
- **`.graphifyignore`** — code-focused graph profile for the GraphStack source repo (reduces markdown noise in `graphify-out/`).
1414
- **`docs/case-studies/graphstack-self.md`** — honest self-analysis: graph quality on a meta-repo, token savings confidence levels, validation workflow.
1515
- **README Limitations** section — orchestrator enforcement, token estimates, graph ROI, setup steps.
16-
- **Pytest**5 new tests in `test_validate.py` (28 total in suite).
16+
- **Pytest**6 new tests in `test_validate.py` (29 total in suite).
1717

1818
### Changed
1919
- **CI**`pip install -e .` before tests; `graphstack validate --fail-stale-graph` step; `pyproject.toml` and `validate.py` in required-files manifest.
2020
- **Installer** — copies `validate.py` into target projects with the Python package.
2121

2222
### Fixed
23-
- N/A (quality-of-life / transparency release).
23+
- **Graph staleness check**`validate --fail-stale-graph` accepts `HEAD~1` when the graph was built before a dedicated graph-artifacts commit (common release workflow).
2424

2525
---
2626

graphify-out/GRAPH_REPORT.md

Lines changed: 31 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Graph Report - graphstack (2026-05-17)
22

33
## Corpus Check
4-
- 20 files · ~5,551 words
4+
- 20 files · ~5,707 words
55
- Verdict: corpus is large enough that graph structure adds value.
66

77
## Summary
8-
- 454 nodes · 560 edges · 29 communities (25 shown, 4 thin omitted)
9-
- Extraction: 93% EXTRACTED · 7% INFERRED · 0% AMBIGUOUS · INFERRED: 41 edges (avg confidence: 0.8)
8+
- 459 nodes · 570 edges · 30 communities (26 shown, 4 thin omitted)
9+
- Extraction: 92% EXTRACTED · 8% INFERRED · 0% AMBIGUOUS · INFERRED: 43 edges (avg confidence: 0.8)
1010
- Token cost: 0 input · 0 output
1111

1212
## Graph Freshness
13-
- Built from commit: `f1365cd9`
13+
- Built from commit: `68d5e32f`
1414
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
1515
- Run `graphify update .` after code changes (no API cost).
1616

@@ -38,17 +38,18 @@
3838
- [[_COMMUNITY_Community 20|Community 20]]
3939
- [[_COMMUNITY_Community 21|Community 21]]
4040
- [[_COMMUNITY_Community 22|Community 22]]
41-
- [[_COMMUNITY_Community 26|Community 26]]
41+
- [[_COMMUNITY_Community 23|Community 23]]
4242
- [[_COMMUNITY_Community 27|Community 27]]
43+
- [[_COMMUNITY_Community 28|Community 28]]
4344

4445
## God Nodes (most connected - your core abstractions)
4546
1. `GraphStack 🧠⚡` - 18 edges
4647
2. `echo()` - 17 edges
47-
3. `run_checks()` - 16 edges
48+
3. `run_checks()` - 17 edges
4849
4. `ORCHESTRATOR` - 12 edges
4950
5. `Transition Rules` - 12 edges
50-
6. `Token Optimizer` - 11 edges
51-
7. `run_git()` - 10 edges
51+
6. `run_git()` - 11 edges
52+
7. `Token Optimizer` - 11 edges
5253
8. `GraphStack v4 — Cursor Prompts & Setup Guide` - 9 edges
5354
9. `run_hook()` - 8 edges
5455
10. `install()` - 8 edges
@@ -65,11 +66,11 @@
6566
- `_do_update()` --calls--> `graphify_available()` [INFERRED]
6667
scripts/graphstack/hook.py → scripts/graphstack/platform_utils.py
6768

68-
## Communities (29 total, 4 thin omitted)
69+
## Communities (30 total, 4 thin omitted)
6970

7071
### Community 0 - "Community 0"
71-
Cohesion: 0.05
72-
Nodes (42): Always prefer:, "Are there tests for this?", Bootstrap Mode Graph Schedule, code:block1 (SESSION BUDGET), code:block10 (read([src/auth/login.ts, src/auth/session.ts]) // one tool ), code:block11 ("Context at ~80% capacity. Summarizing intermediate state to), code:block12 (TRIGGER 1 — Structural change (highest priority)), code:bash (# Force update now (run in Cursor or terminal)) (+34 more)
72+
Cohesion: 0.1
73+
Nodes (34): git_available(), graphify_available(), _brief_is_template(), _brief_status(), _build_parser(), check_board_tasks(), check_brief(), check_graph() (+26 more)
7374

7475
### Community 1 - "Community 1"
7576
Cohesion: 0.07
@@ -80,12 +81,12 @@ Cohesion: 0.1
8081
Nodes (35): _build_parser(), cmd_claim(), cmd_complete(), cmd_log(), cmd_new(), cmd_status(), _get(), _git_commit_board() (+27 more)
8182

8283
### Community 3 - "Community 3"
83-
Cohesion: 0.12
84-
Nodes (29): git_available(), graphify_available(), _brief_is_template(), _brief_status(), _build_parser(), check_board_tasks(), check_brief(), check_graph() (+21 more)
84+
Cohesion: 0.07
85+
Nodes (29): Activation, Before every file read, ask internally:, code:block1 (1a. Parallel read (once per session — same tool batch if bot), code:block15 (After Cycle 1 Ship:), code:block16 (Is this in Tier 1 or 2? → Proceed), code:markdown (## [YYYY-MM-DD HH:MM][ROLE][NEXT_ROLE]), code:bash (# On role claim:), code:bash (python -m graphstack board new <task-id> "<title>") (+21 more)
8586

8687
### Community 4 - "Community 4"
8788
Cohesion: 0.07
88-
Nodes (29): Activation, Before every file read, ask internally:, code:block1 (1a. Parallel read (once per session — same tool batch if bot), code:block15 (After Cycle 1 Ship:), code:block16 (Is this in Tier 1 or 2? → Proceed), code:markdown (## [YYYY-MM-DD HH:MM][ROLE][NEXT_ROLE]), code:bash (# On role claim:), code:bash (python -m graphstack board new <task-id> "<title>") (+21 more)
89+
Nodes (29): Always prefer:, Bootstrap Mode Graph Schedule, code:block1 (SESSION BUDGET), code:block10 (read([src/auth/login.ts, src/auth/session.ts]) // one tool ), code:block11 ("Context at ~80% capacity. Summarizing intermediate state to), code:block12 (TRIGGER 1 — Structural change (highest priority)), code:bash (# Force update now (run in Cursor or terminal)), code:block14 (Cycle 1 → Ship → STOP → "Run /graphify . now" → wait for con) (+21 more)
8990

9091
### Community 5 - "Community 5"
9192
Cohesion: 0.07
@@ -124,35 +125,39 @@ Cohesion: 0.19
124125
Nodes (5): Round-trip tests for the GNAP board lifecycle., _read(), test_full_lifecycle_todo_to_done(), test_new_task_creates_file(), test_unicode_title_is_preserved()
125126

126127
### Community 14 - "Community 14"
128+
Cohesion: 0.15
129+
Nodes (13): "Are there tests for this?", code:block3 (graph.json → node["src/auth/login.ts"].edges.filter(e => e.t), code:block4 (graph.json → nodes.filter(n => n.edges.some(e => e.target ==), code:block5 (GRAPH_REPORT.md → cluster section → find cluster containing ), code:block6 (graph.json → BFS from node X, depth 2, outgoing edges only), code:block7 (graph.json → node["src/auth/login.ts"].edges.filter(e => e.t), code:block8 (GRAPH_REPORT.md → patterns section), Graph Query Patterns (+5 more)
130+
131+
### Community 15 - "Community 15"
127132
Cohesion: 0.29
128133
Nodes (5): login(), createSession(), comparePassword(), generateToken(), hashPassword()
129134

130-
### Community 15 - "Community 15"
135+
### Community 16 - "Community 16"
131136
Cohesion: 0.22
132137
Nodes (7): _build_parser(), main(), Top-level CLI dispatcher. Five sub-commands: - ``board`` — GNAP task boa, Entry point for both ``python -m graphstack`` and unit tests., Entry point for both ``python -m graphstack`` and unit tests., GraphStack — cross-platform Python core. This package replaces the bash/Power, Allow ``python -m graphstack`` to invoke the CLI.
133138

134-
### Community 16 - "Community 16"
139+
### Community 17 - "Community 17"
135140
Cohesion: 0.2
136141
Nodes (9): Bootstrap Plan: [Project Name], code:block1 ([Project Name]), Cross-Cutting Concerns, Cycle Log, Cycle Sequence, Known Risks, Module Map, Project Summary (+1 more)
137142

138-
### Community 17 - "Community 17"
143+
### Community 18 - "Community 18"
139144
Cohesion: 0.2
140145
Nodes (9): Acceptance Criteria, Brief: [Feature/Change Name], Graph Context, Handoff Note, Implementation Hints, In Scope, Objective, Out of Scope (+1 more)
141146

142-
### Community 19 - "Community 19"
147+
### Community 20 - "Community 20"
143148
Cohesion: 0.25
144149
Nodes (5): Tests for the post-commit graph-update logic., When ``HEAD~1`` cannot be resolved, structural count must be 0., Files inside graphify-out/ or handoff/ never trigger an update by themselves., test_excludes_generated_paths_from_structural_count(), test_no_previous_commit_skips_structural_diff()
145150

146-
### Community 20 - "Community 20"
151+
### Community 21 - "Community 21"
147152
Cohesion: 0.33
148153
Nodes (5): _disable_git_in_tests(), project_root(), Shared pytest fixtures for the graphstack package., Provide an isolated, writable directory and chdir into it. All board oper, Prevent any board command from creating real git commits during tests.
149154

150-
### Community 21 - "Community 21"
155+
### Community 22 - "Community 22"
151156
Cohesion: 0.33
152157
Nodes (5): code:block1 (board/), GraphStack GNAP Board, How It Works, Task File Format, Why Git?
153158

154159
## Knowledge Gaps
155-
- **191 isolated node(s):** `GNAP board manager — pure Python port of ``scripts/board.sh``. JSON schema is`, `Stage the board directory and commit silently — never fails the command.`, `Top-level CLI dispatcher. Five sub-commands: - ``board`` — GNAP task boa`, `Entry point for both ``python -m graphstack`` and unit tests.`, `Path and configuration constants used across the package. Paths are resolved` (+186 more)
160+
- **193 isolated node(s):** `GNAP board manager — pure Python port of ``scripts/board.sh``. JSON schema is`, `Stage the board directory and commit silently — never fails the command.`, `Top-level CLI dispatcher. Five sub-commands: - ``board`` — GNAP task boa`, `Entry point for both ``python -m graphstack`` and unit tests.`, `Path and configuration constants used across the package. Paths are resolved` (+188 more)
156161
These have ≤1 connection - possible missing edges or undocumented components.
157162
- **4 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
158163

@@ -161,15 +166,15 @@ _Questions this graph is uniquely positioned to answer:_
161166

162167
- **Why does `GraphStack 🧠⚡` connect `Community 5` to `Community 9`, `Community 10`?**
163168
_High betweenness centrality (0.017) - this node is a cross-community bridge._
164-
- **Why does `echo()` connect `Community 2` to `Community 8`, `Community 3`?**
169+
- **Why does `echo()` connect `Community 2` to `Community 8`, `Community 0`?**
165170
_High betweenness centrality (0.011) - this node is a cross-community bridge._
166171
- **Why does `Quick Start` connect `Community 9` to `Community 5`?**
167172
_High betweenness centrality (0.011) - this node is a cross-community bridge._
168173
- **Are the 14 inferred relationships involving `echo()` (e.g. with `_print_task()` and `cmd_status()`) actually correct?**
169174
_`echo()` has 14 INFERRED edges - model-reasoned connections that need verification._
170-
- **Are the 5 inferred relationships involving `run_checks()` (e.g. with `test_validate_reports_template_brief_as_warning()` and `test_validate_strict_template_brief_is_error()`) actually correct?**
171-
_`run_checks()` has 5 INFERRED edges - model-reasoned connections that need verification._
175+
- **Are the 6 inferred relationships involving `run_checks()` (e.g. with `test_validate_reports_template_brief_as_warning()` and `test_validate_strict_template_brief_is_error()`) actually correct?**
176+
_`run_checks()` has 6 INFERRED edges - model-reasoned connections that need verification._
172177
- **What connects `GNAP board manager — pure Python port of ``scripts/board.sh``. JSON schema is`, `Stage the board directory and commit silently — never fails the command.`, `Top-level CLI dispatcher. Five sub-commands: - ``board`` — GNAP task boa` to the rest of the system?**
173-
_191 weakly-connected nodes found - possible documentation gaps or missing edges._
178+
_193 weakly-connected nodes found - possible documentation gaps or missing edges._
174179
- **Should `Community 0` be split into smaller, more focused modules?**
175-
_Cohesion score 0.05 - nodes in this community are weakly interconnected._
180+
_Cohesion score 0.1 - nodes in this community are weakly interconnected._

graphify-out/graph.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)