Split from #307.
This issue delivers a feature plus its documentation: a cascade graph --update flag that
keeps a committed diagram current, and the docs that explain the graph command surface and
the marker-block workflow.
Feature
Add a cascade graph --update <file> flag that rewrites a fenced mermaid code block located
between sentinel comment markers in a target file. It is opt-in and non-destructive:
- It only replaces the content between the sentinel markers, leaving the rest of the file
byte-identical.
- It is a clear no-op with an informative message if the markers are absent.
- Re-running it is idempotent: a second run against an already-current file produces no
change.
Docs
- A dedicated docs page under
docs/src/content/docs covering the graph granularities
(jobs, stages, env, cross-repo) and the --theme flag, with a rendered mermaid example.
- A README marker-block workflow demonstrating how to commit a rendered diagram that stays
current via --update.
cli-reference already documents the graph command (landed in #421). This issue adds the
--update feature, the standalone docs page, and the README slice, not the command
reference.
Files and areas
internal/graph/command.go - the new --update flag and the marker-rewrite logic.
- The new docs page under
docs/src/content/docs.
README.md - the marker-block workflow.
Acceptance
- Unit tests for the marker rewrite: idempotent re-run, absent-marker no-op, and surrounding
bytes preserved.
- An e2e scenario under the repo's CLI-surface standard exercising
cascade graph --update.
- A docs page documents the granularities and
--theme, with a rendered mermaid example.
- The README marker-block workflow is documented so a user can commit and refresh a diagram.
- The docs site builds.
Split from #307.
This issue delivers a feature plus its documentation: a
cascade graph --updateflag thatkeeps a committed diagram current, and the docs that explain the
graphcommand surface andthe marker-block workflow.
Feature
Add a
cascade graph --update <file>flag that rewrites a fenced mermaid code block locatedbetween sentinel comment markers in a target file. It is opt-in and non-destructive:
byte-identical.
change.
Docs
docs/src/content/docscovering thegraphgranularities(jobs, stages, env, cross-repo) and the
--themeflag, with a rendered mermaid example.current via
--update.cli-reference already documents the
graphcommand (landed in #421). This issue adds the--updatefeature, the standalone docs page, and the README slice, not the commandreference.
Files and areas
internal/graph/command.go- the new--updateflag and the marker-rewrite logic.docs/src/content/docs.README.md- the marker-block workflow.Acceptance
bytes preserved.
cascade graph --update.--theme, with a rendered mermaid example.