Spaces:
Running
Running
Commit ·
e82a5f2
1
Parent(s): cf2f7da
Add production push utilities and inline help comments to Makefile
Browse files- AGENTS.md +1 -1
- Makefile +42 -7
- docs/superpowers/plans/2026-06-30-make-help-inline-comments.md +75 -0
- docs/superpowers/plans/2026-06-30-prod-push-utilities.md +75 -0
- docs/superpowers/specs/2026-06-30-make-help-inline-comments-design.md +30 -0
- docs/superpowers/specs/2026-06-30-prod-push-utilities-design.md +33 -0
AGENTS.md
CHANGED
|
@@ -51,7 +51,7 @@ that leaderboard data remains consistent with `data/leaderboard.json`.
|
|
| 51 |
<claude-mem-context>
|
| 52 |
# Memory Context
|
| 53 |
|
| 54 |
-
# [NowAI-Bench] recent context, 2026-06-30
|
| 55 |
|
| 56 |
Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision 🚨security_alert 🔐security_note
|
| 57 |
Format: ID TIME TYPE TITLE
|
|
|
|
| 51 |
<claude-mem-context>
|
| 52 |
# Memory Context
|
| 53 |
|
| 54 |
+
# [NowAI-Bench] recent context, 2026-06-30 1:02pm PDT
|
| 55 |
|
| 56 |
Legend: 🎯session 🔴bugfix 🟣feature 🔄refactor ✅change 🔵discovery ⚖️decision 🚨security_alert 🔐security_note
|
| 57 |
Format: ID TIME TYPE TITLE
|
Makefile
CHANGED
|
@@ -1,16 +1,51 @@
|
|
| 1 |
SYNC := .claude/skills/sync-nowai-leaderboard/sync.mjs
|
| 2 |
LOG := $(HOME)/Library/Logs/nowai-sync.log
|
| 3 |
|
| 4 |
-
.PHONY: sync check logs
|
| 5 |
|
| 6 |
-
## Run full sync (commit + push to staging)
|
| 7 |
-
sync:
|
| 8 |
node $(SYNC) --push
|
| 9 |
|
| 10 |
-
## Dry-run: print diff, no writes
|
| 11 |
-
check:
|
| 12 |
node $(SYNC) --check
|
| 13 |
|
| 14 |
-
## Show last 50 lines of the sync log
|
| 15 |
-
logs:
|
| 16 |
tail -50 $(LOG)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
SYNC := .claude/skills/sync-nowai-leaderboard/sync.mjs
|
| 2 |
LOG := $(HOME)/Library/Logs/nowai-sync.log
|
| 3 |
|
| 4 |
+
.PHONY: sync check logs push-to-prod force-push-to-prod
|
| 5 |
|
| 6 |
+
sync: ## Run full sync (commit + push to staging)
|
|
|
|
| 7 |
node $(SYNC) --push
|
| 8 |
|
| 9 |
+
check: ## Dry-run: print diff, no writes
|
|
|
|
| 10 |
node $(SYNC) --check
|
| 11 |
|
| 12 |
+
logs: ## Show last 50 lines of the sync log
|
|
|
|
| 13 |
tail -50 $(LOG)
|
| 14 |
+
|
| 15 |
+
push-to-prod: ## Push current main to production after staging review
|
| 16 |
+
@set -eu; \
|
| 17 |
+
if [ -n "$$(git status --short)" ]; then \
|
| 18 |
+
echo "Refusing to push to prod: working tree is not clean."; \
|
| 19 |
+
exit 1; \
|
| 20 |
+
fi; \
|
| 21 |
+
if [ "$$(git branch --show-current)" != "main" ]; then \
|
| 22 |
+
echo "Refusing to push to prod: current branch must be main."; \
|
| 23 |
+
exit 1; \
|
| 24 |
+
fi; \
|
| 25 |
+
if [ "$$(git rev-parse HEAD)" != "$$(git rev-parse origin/main)" ]; then \
|
| 26 |
+
echo "Refusing to push to prod: local HEAD must match origin/main."; \
|
| 27 |
+
exit 1; \
|
| 28 |
+
fi; \
|
| 29 |
+
echo "WARNING: this will push main to the production remote (prod)."; \
|
| 30 |
+
printf "Hit Enter or type Yes to continue: "; \
|
| 31 |
+
read answer; \
|
| 32 |
+
if [ -n "$$answer" ] && [ "$$answer" != "Yes" ]; then \
|
| 33 |
+
echo "Aborted."; \
|
| 34 |
+
exit 1; \
|
| 35 |
+
fi; \
|
| 36 |
+
git push prod main:main
|
| 37 |
+
|
| 38 |
+
force-push-to-prod: ## Force-push current main to production after explicit confirmation
|
| 39 |
+
@set -eu; \
|
| 40 |
+
echo "WARNING: this will force-push main to the production remote (prod)."; \
|
| 41 |
+
echo "Use this only when you intentionally need to override production history."; \
|
| 42 |
+
printf "Type Yes to continue: "; \
|
| 43 |
+
read answer; \
|
| 44 |
+
if [ "$$answer" != "Yes" ]; then \
|
| 45 |
+
echo "Aborted."; \
|
| 46 |
+
exit 1; \
|
| 47 |
+
fi; \
|
| 48 |
+
git push --force-with-lease prod main:main
|
| 49 |
+
|
| 50 |
+
help: ## Display this help
|
| 51 |
+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
docs/superpowers/plans/2026-06-30-make-help-inline-comments.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Make Help Inline Comments Implementation Plan
|
| 2 |
+
|
| 3 |
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
| 4 |
+
|
| 5 |
+
**Goal:** Restore `make help` output by moving target descriptions inline in `Makefile`.
|
| 6 |
+
|
| 7 |
+
**Architecture:** Keep the existing `help` parsing logic and align the target declarations to that contract. This is a minimal bugfix in one file with command-based verification before and after the change.
|
| 8 |
+
|
| 9 |
+
**Tech Stack:** GNU Make, grep, awk
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## File Structure
|
| 14 |
+
|
| 15 |
+
- Modify: `Makefile` - move target descriptions onto target lines.
|
| 16 |
+
- Create: `docs/superpowers/specs/2026-06-30-make-help-inline-comments-design.md` - approved design record.
|
| 17 |
+
- Create: `docs/superpowers/plans/2026-06-30-make-help-inline-comments.md` - implementation handoff.
|
| 18 |
+
|
| 19 |
+
### Task 1: Reproduce the bug
|
| 20 |
+
|
| 21 |
+
**Files:**
|
| 22 |
+
- Modify: `Makefile`
|
| 23 |
+
|
| 24 |
+
- [ ] **Step 1: Run the failing command**
|
| 25 |
+
|
| 26 |
+
Run:
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
make help
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
Expected: only `help` is listed because the parser does not read comment lines
|
| 33 |
+
above targets.
|
| 34 |
+
|
| 35 |
+
### Task 2: Move descriptions inline
|
| 36 |
+
|
| 37 |
+
**Files:**
|
| 38 |
+
- Modify: `Makefile`
|
| 39 |
+
|
| 40 |
+
- [ ] **Step 1: Move descriptions onto target lines**
|
| 41 |
+
|
| 42 |
+
Change the target declarations to:
|
| 43 |
+
|
| 44 |
+
```make
|
| 45 |
+
sync: ## Run full sync (commit + push to staging)
|
| 46 |
+
check: ## Dry-run: print diff, no writes
|
| 47 |
+
logs: ## Show last 50 lines of the sync log
|
| 48 |
+
push-to-prod: ## Push current main to production after staging review
|
| 49 |
+
force-push-to-prod: ## Force-push current main to production after explicit confirmation
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
- [ ] **Step 2: Keep the existing `help` parser unchanged**
|
| 53 |
+
|
| 54 |
+
Do not modify:
|
| 55 |
+
|
| 56 |
+
```make
|
| 57 |
+
help: ## Display this help
|
| 58 |
+
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
### Task 3: Verify the fix
|
| 62 |
+
|
| 63 |
+
**Files:**
|
| 64 |
+
- Modify: `Makefile`
|
| 65 |
+
|
| 66 |
+
- [ ] **Step 1: Run the verification command**
|
| 67 |
+
|
| 68 |
+
Run:
|
| 69 |
+
|
| 70 |
+
```bash
|
| 71 |
+
make help
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
Expected: `check`, `force-push-to-prod`, `help`, `logs`, `push-to-prod`, and
|
| 75 |
+
`sync` are all listed with descriptions.
|
docs/superpowers/plans/2026-06-30-prod-push-utilities.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Production Push Utilities Implementation Plan
|
| 2 |
+
|
| 3 |
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
| 4 |
+
|
| 5 |
+
**Goal:** Add guarded and force-push production promotion targets to the repo `Makefile`.
|
| 6 |
+
|
| 7 |
+
**Architecture:** Keep prod promotion outside the staging-only sync workflow. Encode the normal safety path in `push-to-prod`, and provide a separate explicit override path in `force-push-to-prod`.
|
| 8 |
+
|
| 9 |
+
**Tech Stack:** GNU Make, POSIX shell, git
|
| 10 |
+
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## File Structure
|
| 14 |
+
|
| 15 |
+
- Modify: `Makefile` — add prod promotion targets and prompt/check logic.
|
| 16 |
+
- Create: `docs/superpowers/specs/2026-06-30-prod-push-utilities-design.md` — approved design record.
|
| 17 |
+
- Create: `docs/superpowers/plans/2026-06-30-prod-push-utilities.md` — implementation handoff.
|
| 18 |
+
|
| 19 |
+
### Task 1: Add guarded prod push target
|
| 20 |
+
|
| 21 |
+
**Files:**
|
| 22 |
+
- Modify: `Makefile`
|
| 23 |
+
|
| 24 |
+
- [ ] **Step 1: Update the phony target list**
|
| 25 |
+
|
| 26 |
+
Add `push-to-prod` and `force-push-to-prod` to `.PHONY`.
|
| 27 |
+
|
| 28 |
+
- [ ] **Step 2: Add `push-to-prod` checks and prompt**
|
| 29 |
+
|
| 30 |
+
Implement a recipe that:
|
| 31 |
+
- fails on a dirty worktree
|
| 32 |
+
- fails off the `main` branch
|
| 33 |
+
- fails if `HEAD` does not match `origin/main`
|
| 34 |
+
- prints a warning
|
| 35 |
+
- accepts either empty input or `Yes`
|
| 36 |
+
- pushes with `git push prod main:main`
|
| 37 |
+
|
| 38 |
+
- [ ] **Step 3: Verify normal guard behavior**
|
| 39 |
+
|
| 40 |
+
Run a safe verification while the worktree is dirty:
|
| 41 |
+
|
| 42 |
+
```bash
|
| 43 |
+
printf '\n' | make push-to-prod
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Expected: the target exits non-zero before any push and reports that the
|
| 47 |
+
working tree must be clean.
|
| 48 |
+
|
| 49 |
+
### Task 2: Add explicit override target
|
| 50 |
+
|
| 51 |
+
**Files:**
|
| 52 |
+
- Modify: `Makefile`
|
| 53 |
+
|
| 54 |
+
- [ ] **Step 1: Add `force-push-to-prod` prompt**
|
| 55 |
+
|
| 56 |
+
Implement a recipe that prints a stronger warning, accepts either empty input
|
| 57 |
+
or `Yes`, and aborts on any other input.
|
| 58 |
+
|
| 59 |
+
- [ ] **Step 2: Push with lease protection**
|
| 60 |
+
|
| 61 |
+
Use:
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
git push --force-with-lease prod main:main
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
- [ ] **Step 3: Verify abort behavior**
|
| 68 |
+
|
| 69 |
+
Run:
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
printf 'no\n' | make force-push-to-prod
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
Expected: the target exits non-zero with an abort message and does not push.
|
docs/superpowers/specs/2026-06-30-make-help-inline-comments-design.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Make Help Inline Comments Design
|
| 2 |
+
|
| 3 |
+
**Date:** 2026-06-30
|
| 4 |
+
**Status:** Approved
|
| 5 |
+
|
| 6 |
+
## Goal
|
| 7 |
+
|
| 8 |
+
Restore `make help` output for the existing targets without changing the current
|
| 9 |
+
`help` parser.
|
| 10 |
+
|
| 11 |
+
## Root Cause
|
| 12 |
+
|
| 13 |
+
The `help` recipe matches only lines shaped like
|
| 14 |
+
`target: ... ## description`. Most target descriptions in `Makefile` were moved
|
| 15 |
+
to the line above the target, so the parser no longer sees them.
|
| 16 |
+
|
| 17 |
+
## Decision
|
| 18 |
+
|
| 19 |
+
- Keep the `help` recipe unchanged.
|
| 20 |
+
- Move target descriptions inline onto the same line as each target:
|
| 21 |
+
- `sync`
|
| 22 |
+
- `check`
|
| 23 |
+
- `logs`
|
| 24 |
+
- `push-to-prod`
|
| 25 |
+
- `force-push-to-prod`
|
| 26 |
+
|
| 27 |
+
## Verification
|
| 28 |
+
|
| 29 |
+
- Before the fix, `make help` shows only `help`.
|
| 30 |
+
- After the fix, `make help` shows all documented targets.
|
docs/superpowers/specs/2026-06-30-prod-push-utilities-design.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Production Push Utilities Design
|
| 2 |
+
|
| 3 |
+
**Date:** 2026-06-30
|
| 4 |
+
**Status:** Approved
|
| 5 |
+
|
| 6 |
+
## Goal
|
| 7 |
+
|
| 8 |
+
Add explicit manual promotion utilities for pushing the current `main` branch to
|
| 9 |
+
the production Hugging Face Space remote after staging has been reviewed.
|
| 10 |
+
|
| 11 |
+
## Decisions
|
| 12 |
+
|
| 13 |
+
- Keep leaderboard sync automation staging-only.
|
| 14 |
+
- Add two manual `Makefile` targets:
|
| 15 |
+
- `push-to-prod` for guarded promotion.
|
| 16 |
+
- `force-push-to-prod` for explicit override.
|
| 17 |
+
- Require an interactive warning prompt before either target pushes.
|
| 18 |
+
- `push-to-prod` must fail unless:
|
| 19 |
+
- the worktree is clean
|
| 20 |
+
- the current branch is `main`
|
| 21 |
+
- `HEAD` matches `origin/main`
|
| 22 |
+
- `force-push-to-prod` may bypass those checks, but it must still require a
|
| 23 |
+
stronger warning prompt and use `--force-with-lease`.
|
| 24 |
+
|
| 25 |
+
## Commands
|
| 26 |
+
|
| 27 |
+
- Guarded push: `git push prod main:main`
|
| 28 |
+
- Override push: `git push --force-with-lease prod main:main`
|
| 29 |
+
|
| 30 |
+
## Scope
|
| 31 |
+
|
| 32 |
+
Only the repo `Makefile` changes behavior. No changes are needed to the
|
| 33 |
+
staging-only sync skill or its guardrails.
|