mirror of
https://github.com/garrytan/gstack.git
synced 2026-10-31 14:06:50 +01:00
Resolutions: - design-doc discovery: main's bin/gstack-design-doc-find replaces the inline block; it keeps #2839 (a root DESIGN.md is the design system, never the design doc; only docs/designs/ competes on freshness). Its unit test and the F2 harness (now installs the helper) follow. - design-shotgun: main's $D variants batch, staged under ${TMPDIR:-/tmp}. - memory ingest: main's scoped consent (scope counts, purge of staged pages outside the scope, zero-sessions notice) on the wave's locked state flow; the purge runs before the state loads, under the lock. - setup / render library: --model overlay plus --disabled-skills on every Claude render, including main's plain overlay render. - codex template and constants: the wave's sandbox preflight and unverified mode; main's issue-number removals. - docsync interface: ls-tree (main) and check-ignore (wave) are both reads. - census pins re-measured on the merged tree: 114 paid files; gate behavior census 44 files / 76 shards (periodic-only files skip the gate, now including two safety-rule evals); periodic floor 35,742 and release sum 58,097 (gate-only files no longer count toward periodic). - parity caps at measured merged sizes: ship 1.4271, review 1.1981, qa 1.1099. - generated output regenerated (gen:skill-docs --host all, llms.txt, context budget, goldens).
46 lines
1.6 KiB
Bash
Executable File
46 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# gstack-design-doc-find — print the design doc a plan review should read.
|
|
#
|
|
# Usage: gstack-design-doc-find <slug> <branch>
|
|
#
|
|
# Prints one absolute path, or nothing when no design doc exists. Exit 0 either
|
|
# way; exit 2 on a usage error.
|
|
#
|
|
# Precedence:
|
|
# 1. newest $GSTACK_STATE_ROOT/projects/<slug>/*-<branch>-design-*.md
|
|
# 2. else newest $GSTACK_STATE_ROOT/projects/<slug>/*-design-*.md
|
|
# 3. the newest repo doc under $TOP/docs/designs/ wins when no state-root doc
|
|
# exists or it is newer than the state-root doc. A root DESIGN.md is the
|
|
# design system /design-consultation writes, never a design doc (#2839).
|
|
# office-hours writes both copies; the committed copy is what teammates
|
|
# see, but a stale repo doc never shadows a newer private session.
|
|
set -u
|
|
|
|
if [ "$#" -ne 2 ] || [ -z "$1" ]; then
|
|
echo "usage: gstack-design-doc-find <slug> <branch>" >&2
|
|
exit 2
|
|
fi
|
|
SLUG=$1
|
|
BRANCH=$2
|
|
|
|
eval "$("$(dirname "$0")/gstack-paths")"; : "${GSTACK_STATE_ROOT:?gstack-paths failed; reinstall with ./setup or /gstack-upgrade}"
|
|
|
|
newest() {
|
|
ls -t "$@" 2>/dev/null | head -1
|
|
}
|
|
|
|
PROJECT_DIR="$GSTACK_STATE_ROOT/projects/$SLUG"
|
|
LOCALDOC=$(newest "$PROJECT_DIR"/*-"$BRANCH"-design-*.md)
|
|
[ -z "$LOCALDOC" ] && LOCALDOC=$(newest "$PROJECT_DIR"/*-design-*.md)
|
|
|
|
REPODOC=""
|
|
TOP=$(git rev-parse --show-toplevel 2>/dev/null || true)
|
|
[ -n "$TOP" ] && REPODOC=$(newest "$TOP"/docs/designs/*.md)
|
|
|
|
DESIGN="$LOCALDOC"
|
|
if [ -n "$REPODOC" ] && { [ -z "$LOCALDOC" ] || [ "$REPODOC" -nt "$LOCALDOC" ]; }; then
|
|
DESIGN="$REPODOC"
|
|
fi
|
|
[ -n "$DESIGN" ] && printf '%s\n' "$DESIGN"
|
|
exit 0
|