@smartmemory/compose 0.2.26-beta → 0.2.28-beta

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartmemory/compose",
3
- "version": "0.2.26-beta",
3
+ "version": "0.2.28-beta",
4
4
  "description": "Structured AI dev pipeline — goal-to-product orchestration with gates, iteration loops, and feature lifecycle management.",
5
5
  "author": "SmartMemory",
6
6
  "license": "MIT",
@@ -0,0 +1,47 @@
1
+ # Compose roadmap-graph CI gate — COMP-ROADMAP-GRAPH-1-1.
2
+ #
3
+ # Drop this into .github/workflows/ (or merge the `roadmap-graph` job into an
4
+ # existing workflow). It guards the roadmap dependency graph on every push / PR.
5
+ #
6
+ # Two modes — pick one:
7
+ # A. COMMITTED GRAPH (recommended for stable roadmaps): the repo commits
8
+ # roadmap-graph.html; CI runs `--check` and fails the PR if it is stale or
9
+ # dangling, forcing contributors to regenerate.
10
+ # B. ARTIFACT-ONLY (recommended for high-churn roadmaps): the graph is NOT
11
+ # committed; CI regenerates it fresh each run, fails only on a dangling
12
+ # edge, and uploads the HTML as a downloadable artifact.
13
+ #
14
+ # The `compose` CLI must be available — adjust the install step to your setup
15
+ # (global install, npx, or a local checkout's `node bin/compose.js`).
16
+
17
+ name: roadmap-graph
18
+ on:
19
+ push:
20
+ branches: [main]
21
+ pull_request:
22
+
23
+ jobs:
24
+ roadmap-graph:
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: actions/setup-node@v4
29
+ with:
30
+ node-version: 22
31
+
32
+ # Make `compose` available. Replace with your install method.
33
+ - name: Install compose
34
+ run: npm install -g @smartmemory/compose
35
+
36
+ # ---- Mode A: committed graph (fails on stale OR dangling) --------------
37
+ - name: Check roadmap graph (committed)
38
+ run: compose roadmap graph --check
39
+
40
+ # ---- Mode B: artifact-only (uncomment; remove Mode A above) ------------
41
+ # - name: Generate roadmap graph (fails on dangling edge)
42
+ # run: compose roadmap graph --out roadmap-graph.html
43
+ # - name: Upload roadmap graph
44
+ # uses: actions/upload-artifact@v4
45
+ # with:
46
+ # name: roadmap-graph
47
+ # path: roadmap-graph.html
@@ -0,0 +1,51 @@
1
+ #!/usr/bin/env bash
2
+ # Compose roadmap-graph pre-push gate — COMP-ROADMAP-GRAPH-1-1.
3
+ #
4
+ # Blocks a push when the project's roadmap dependency graph is broken or stale:
5
+ # • a deps.yaml edge points at a feature that exists nowhere (DANGLING_EDGE —
6
+ # the Cytoscape-crash bug class), or
7
+ # • the committed roadmap-graph.html no longer matches a fresh regeneration
8
+ # (someone hand-edited it, or changed feature.json / deps.yaml / frontmatter
9
+ # without regenerating).
10
+ #
11
+ # OPT-IN by file presence: if the graph file does not exist, this project is not
12
+ # using the graph and the gate no-ops. Generate + commit the graph once
13
+ # (`compose roadmap graph`) to turn the gate on.
14
+ #
15
+ # Use it one of two ways:
16
+ # 1. Standalone — copy to .git/hooks/pre-push and `chmod +x`. Executed
17
+ # directly, it runs the gate and exits with its status.
18
+ # 2. Compose with an existing hook — `source` this file from your pre-push
19
+ # hook and call the function yourself, so you can combine gates:
20
+ # source path/to/roadmap-graph-pre-push.sh
21
+ # roadmap_graph_gate || exit 1
22
+ # When sourced it only DEFINES the function (no exit), so it never
23
+ # terminates your shell.
24
+ #
25
+ # Config (env):
26
+ # COMPOSE command used to invoke compose (default: "compose")
27
+ # COMPOSE_GRAPH_OUT path to the graph HTML (default: "roadmap-graph.html";
28
+ # set this if compose.json#roadmap_graph.out is customized)
29
+
30
+ roadmap_graph_gate() {
31
+ local compose="${COMPOSE:-compose}"
32
+ local out="${COMPOSE_GRAPH_OUT:-roadmap-graph.html}"
33
+
34
+ # Opt-in: no graph on disk → not in use → skip silently.
35
+ [ -f "$out" ] || return 0
36
+
37
+ if ! $compose roadmap graph --check --out "$out" >&2; then
38
+ echo "" >&2
39
+ echo "pre-push: roadmap graph is broken or stale — push aborted." >&2
40
+ echo " Fix: \`$compose roadmap graph\` (regenerate), or repair the dangling deps.yaml edge above." >&2
41
+ echo " Bypass at your own risk: git push --no-verify" >&2
42
+ return 1
43
+ fi
44
+ return 0
45
+ }
46
+
47
+ # Executed directly (not sourced): run the gate and exit with its status.
48
+ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
49
+ roadmap_graph_gate
50
+ exit $?
51
+ fi