Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/gstack-slug
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ if [[ -n "$SLUG" ]]; then
fi

RAW_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) || RAW_BRANCH=""
BRANCH=$(printf '%s' "${RAW_BRANCH:-}" | tr -cd 'a-zA-Z0-9._-')
BRANCH=$(printf '%s' "${RAW_BRANCH:-}" | tr '/' '-' | tr -cd 'a-zA-Z0-9._-')
BRANCH="${BRANCH:-unknown}"
echo "SLUG=$SLUG"
echo "BRANCH=$BRANCH"
19 changes: 11 additions & 8 deletions ship/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1344,16 +1344,17 @@ git push -u origin <branch-name>

## Step 20: Persist ship metrics

Log coverage and plan completion data so `/retro` can track trends:
Log coverage and plan completion data so `/retro` can track trends.

```bash
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
```

Append to `~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl`:
Route the append through `gstack-review-log`. It resolves the project slug and
the canonical branch form itself, creates the directory, validates the JSON, and
enqueues the row for gbrain sync. It takes **no path argument** — never build a
`<branch>-reviews.jsonl` path by hand. A branch with a `/` in it turns a
hand-built path into a subdirectory write, and the row goes somewhere `/retro`
will never look.

```bash
echo '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"BRANCH"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"'"$(git rev-parse --abbrev-ref HEAD)"'"}'
```

Substitute from earlier steps:
Expand All @@ -1362,7 +1363,9 @@ Substitute from earlier steps:
- **PLAN_DONE**: count of DONE + CHANGED items from Step 8 (0 if no plan file)
- **VERIFY_RESULT**: "pass", "fail", or "skipped" from Step 8.1
- **VERSION**: from the VERSION file
- **BRANCH**: current branch name

The branch name is filled in by the shell — there is no `BRANCH` placeholder to
substitute.

This step is automatic — never skip it, never ask for confirmation.

Expand Down
19 changes: 11 additions & 8 deletions ship/SKILL.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,17 @@ git push -u origin <branch-name>

## Step 20: Persist ship metrics

Log coverage and plan completion data so `/retro` can track trends:
Log coverage and plan completion data so `/retro` can track trends.

```bash
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
```

Append to `~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl`:
Route the append through `gstack-review-log`. It resolves the project slug and
the canonical branch form itself, creates the directory, validates the JSON, and
enqueues the row for gbrain sync. It takes **no path argument** — never build a
`<branch>-reviews.jsonl` path by hand. A branch with a `/` in it turns a
hand-built path into a subdirectory write, and the row goes somewhere `/retro`
will never look.

```bash
echo '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"BRANCH"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"'"$(git rev-parse --abbrev-ref HEAD)"'"}'
```

Substitute from earlier steps:
Expand All @@ -482,7 +483,9 @@ Substitute from earlier steps:
- **PLAN_DONE**: count of DONE + CHANGED items from Step 8 (0 if no plan file)
- **VERIFY_RESULT**: "pass", "fail", or "skipped" from Step 8.1
- **VERSION**: from the VERSION file
- **BRANCH**: current branch name

The branch name is filled in by the shell — there is no `BRANCH` placeholder to
substitute.

This step is automatic — never skip it, never ask for confirmation.

Expand Down
19 changes: 11 additions & 8 deletions test/fixtures/golden/claude-ship-SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1344,16 +1344,17 @@ git push -u origin <branch-name>

## Step 20: Persist ship metrics

Log coverage and plan completion data so `/retro` can track trends:
Log coverage and plan completion data so `/retro` can track trends.

```bash
eval "$(~/.claude/skills/gstack/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
```

Append to `~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl`:
Route the append through `gstack-review-log`. It resolves the project slug and
the canonical branch form itself, creates the directory, validates the JSON, and
enqueues the row for gbrain sync. It takes **no path argument** — never build a
`<branch>-reviews.jsonl` path by hand. A branch with a `/` in it turns a
hand-built path into a subdirectory write, and the row goes somewhere `/retro`
will never look.

```bash
echo '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"BRANCH"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
~/.claude/skills/gstack/bin/gstack-review-log '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"'"$(git rev-parse --abbrev-ref HEAD)"'"}'
```

Substitute from earlier steps:
Expand All @@ -1362,7 +1363,9 @@ Substitute from earlier steps:
- **PLAN_DONE**: count of DONE + CHANGED items from Step 8 (0 if no plan file)
- **VERIFY_RESULT**: "pass", "fail", or "skipped" from Step 8.1
- **VERSION**: from the VERSION file
- **BRANCH**: current branch name

The branch name is filled in by the shell — there is no `BRANCH` placeholder to
substitute.

This step is automatic — never skip it, never ask for confirmation.

Expand Down
19 changes: 11 additions & 8 deletions test/fixtures/golden/codex-ship-SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2730,16 +2730,17 @@ Print the branch name, remote URL, and instruct the user to create the PR/MR man

## Step 20: Persist ship metrics

Log coverage and plan completion data so `/retro` can track trends:
Log coverage and plan completion data so `/retro` can track trends.

```bash
eval "$($GSTACK_ROOT/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
```

Append to `~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl`:
Route the append through `gstack-review-log`. It resolves the project slug and
the canonical branch form itself, creates the directory, validates the JSON, and
enqueues the row for gbrain sync. It takes **no path argument** — never build a
`<branch>-reviews.jsonl` path by hand. A branch with a `/` in it turns a
hand-built path into a subdirectory write, and the row goes somewhere `/retro`
will never look.

```bash
echo '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"BRANCH"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
$GSTACK_ROOT/bin/gstack-review-log '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"'"$(git rev-parse --abbrev-ref HEAD)"'"}'
```

Substitute from earlier steps:
Expand All @@ -2748,7 +2749,9 @@ Substitute from earlier steps:
- **PLAN_DONE**: count of DONE + CHANGED items from Step 8 (0 if no plan file)
- **VERIFY_RESULT**: "pass", "fail", or "skipped" from Step 8.1
- **VERSION**: from the VERSION file
- **BRANCH**: current branch name

The branch name is filled in by the shell — there is no `BRANCH` placeholder to
substitute.

This step is automatic — never skip it, never ask for confirmation.

Expand Down
19 changes: 11 additions & 8 deletions test/fixtures/golden/factory-ship-SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -3136,16 +3136,17 @@ Print the branch name, remote URL, and instruct the user to create the PR/MR man

## Step 20: Persist ship metrics

Log coverage and plan completion data so `/retro` can track trends:
Log coverage and plan completion data so `/retro` can track trends.

```bash
eval "$($GSTACK_ROOT/bin/gstack-slug 2>/dev/null)" && mkdir -p ~/.gstack/projects/$SLUG
```

Append to `~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl`:
Route the append through `gstack-review-log`. It resolves the project slug and
the canonical branch form itself, creates the directory, validates the JSON, and
enqueues the row for gbrain sync. It takes **no path argument** — never build a
`<branch>-reviews.jsonl` path by hand. A branch with a `/` in it turns a
hand-built path into a subdirectory write, and the row goes somewhere `/retro`
will never look.

```bash
echo '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"BRANCH"}' >> ~/.gstack/projects/$SLUG/$BRANCH-reviews.jsonl
$GSTACK_ROOT/bin/gstack-review-log '{"skill":"ship","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'","coverage_pct":COVERAGE_PCT,"plan_items_total":PLAN_TOTAL,"plan_items_done":PLAN_DONE,"verification_result":"VERIFY_RESULT","version":"VERSION","branch":"'"$(git rev-parse --abbrev-ref HEAD)"'"}'
```

Substitute from earlier steps:
Expand All @@ -3154,7 +3155,9 @@ Substitute from earlier steps:
- **PLAN_DONE**: count of DONE + CHANGED items from Step 8 (0 if no plan file)
- **VERIFY_RESULT**: "pass", "fail", or "skipped" from Step 8.1
- **VERSION**: from the VERSION file
- **BRANCH**: current branch name

The branch name is filled in by the shell — there is no `BRANCH` placeholder to
substitute.

This step is automatic — never skip it, never ask for confirmation.

Expand Down