From e39b442ea31eeb6ceeca6284a6db320b35cc7075 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 25 Apr 2026 10:39:55 +0000 Subject: [PATCH 1/2] Initial plan From 413fd5f3704fe67876fe8442824c88b6ca08771a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 25 Apr 2026 10:46:06 +0000 Subject: [PATCH 2/2] fix: use scratchpad/architecture.md as cache source of truth - Remove last_diagram from architecture-state.json cache - Add check for scratchpad/architecture.md existence with content as part of noop condition - Recompile lock file Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6211b5ec-785b-4942-800b-e7903d989608 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-architecture-diagram.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/daily-architecture-diagram.md b/.github/workflows/daily-architecture-diagram.md index fa9a338cb96..2de7623f107 100644 --- a/.github/workflows/daily-architecture-diagram.md +++ b/.github/workflows/daily-architecture-diagram.md @@ -53,13 +53,13 @@ Before doing any work, check cache-memory for a file named `architecture-state.j 1. Read `architecture-state.json` from cache-memory. It contains: - `last_commit`: the last analyzed commit SHA - - `last_diagram`: the previously generated ASCII diagram - `package_map`: a JSON object mapping each package path to its description and layer 2. Run `git log --oneline ..HEAD --name-only` to get the list of files changed since the last run. -3. If **no Go files** (`.go`) changed AND no new directories were added under `pkg/` or `cmd/`: +3. Check whether `scratchpad/architecture.md` exists and contains diagram content (look for a code block with ASCII art). +4. If **no Go files** (`.go`) changed AND no new directories were added under `pkg/` or `cmd/` AND `scratchpad/architecture.md` exists with diagram content: - Call the `noop` safe output with message: "No structural changes since last run (last commit: ``). Architecture diagram is still current." - **Stop here.** -4. Otherwise, focus your analysis **only on the changed packages** — re-analyze those and merge the updates into the cached `package_map`. +5. Otherwise, focus your analysis **only on the changed packages** — re-analyze those and merge the updates into the cached `package_map`. ### If the cache file does NOT exist: @@ -145,7 +145,6 @@ After generating the diagram, write an updated `architecture-state.json` to cach ```json { "last_commit": "", - "last_diagram": "", "package_map": { "cli": { "description": "Command implementations", "layer": "core" }, "workflow": { "description": "Workflow compilation", "layer": "core" }