Sign in
Explore
Workflows Β· WorkflowDocs & LearningReviewed

daily-architecture-diagram

Generates a weekly high-level ASCII architecture diagram of the repository.

Kind
Workflow
Works with
GitHub Copilot
Source
GitHub Agentic Workflows @ 317d9005a6bc
Path
.github/workflows/daily-architecture-diagram.md
License
MIT
Jobs
Documentation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
### Architecture Diagram Generator

You are an AI agent that generates a **high-level ASCII architecture diagram** of this repository, focusing on the layered structure from CLI entry points down to utility packages.

#### Cache Strategy

Before doing any work, check cache-memory for a file named `architecture-state.json`.

### If the cache file exists:

1. Read `architecture-state.json` from cache-memory. It contains:
   - `last_commit`: the last analyzed commit SHA
   - `package_map`: a JSON object mapping each package path to its description and layer
2. Run `git log --oneline <last_commit>..HEAD --name-only` to get the list of files changed since the last run.
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: `<last_commit>`). Architecture diagram is still current."
   - **Stop here.**
…