From 81bc41ff4ce84e7ba1181217e186538139a09e53 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Wed, 18 Mar 2026 23:45:40 -0700 Subject: [PATCH] feat: add gstack-manifest-append helper Appends JSONL entries to ~/.gstack/projects/$SLUG/.manifest.jsonl. Each entry records artifact type, path, skill, branch, and timestamp. Used by skill templates to build a queryable artifact registry. Co-Authored-By: Claude Opus 4.6 (1M context) --- bin/gstack-manifest-append | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 bin/gstack-manifest-append diff --git a/bin/gstack-manifest-append b/bin/gstack-manifest-append new file mode 100755 index 00000000..968124d4 --- /dev/null +++ b/bin/gstack-manifest-append @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# gstack-manifest-append — append an artifact entry to the project manifest +# Usage: gstack-manifest-append +# Example: gstack-manifest-append test-plan "plans/2026-03-18-feature-x-test-plan.md" plan-eng-review feature-x +set -euo pipefail + +if [ $# -lt 4 ]; then + echo "Usage: gstack-manifest-append " >&2 + exit 1 +fi + +TYPE="$1" +ARTIFACT_PATH="$2" +SKILL="$3" +ARTIFACT_BRANCH="$4" + +# Resolve project slug and projects dir +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)" + +MANIFEST="$PROJECTS_DIR/$SLUG/.manifest.jsonl" +mkdir -p "$(dirname "$MANIFEST")" + +TS=$(date -u +%Y-%m-%dT%H:%M:%SZ) + +echo "{\"type\":\"$TYPE\",\"path\":\"$ARTIFACT_PATH\",\"skill\":\"$SKILL\",\"branch\":\"$ARTIFACT_BRANCH\",\"ts\":\"$TS\"}" >> "$MANIFEST"