You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/superpowers/plans/2026-06-12-profile-publish.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
**Goal:**`ax profile publish` pushes the ProfileV1 artifact to a user-owned public gist (create once, PATCH in place), registers the user via fork + PR into `Necmttn/ax` (`community/users/<login>.json`), and the watcher keeps the gist fresh; `ax profile unpublish` reverses it.
6
6
7
-
**Architecture:** A `GitHubEnv` Effect service (mirrors hooks-sdk `GitEnv`: Context.Service + Live/Test layers) wraps every `gh api` call so all publish logic is layer-testable without network. Local consent + gist state lives in `~/.ax/profile-publish.json` (atomic-write). The publish pipeline: render (Plan 1 `buildProfile`) → first-run consent (print exact JSON, y/N) → gist create/patch → one-time registration (fork → remote commit via git-data API, no local clone → PR). Watcher plist gains a debounced `profile publish --if-stale=6h` step that silently no-ops until the user has consented once.
7
+
**Architecture:** A `GitHubEnv` Effect service (mirrors hooks-sdk `GitEnv`: Context.Service + Live/Test layers) wraps every `gh api` call so all publish logic is layer-testable without network. Local consent + gist state lives in `~/.ax/profile-publish.json` (atomic-write). The publish pipeline: render (Plan 1 `buildProfile`) → first-run consent (print exact JSON, y/N) → gist create/patch → one-time registration (fork → remote commit via git-data API, no local clone → PR). Watcher plist gains a debounced `profile publish --if-stale=2h` step that silently no-ops until the user has consented once.
8
8
9
9
**Tech Stack:** bun, effect@beta v4, `gh` CLI (auth + API transport), `@ax/lib/atomic-write`, bun:test with layer mocks.
10
10
@@ -810,7 +810,7 @@ Expected: all pass (no new RUNTIME entries needed - `profile` family already reg
810
810
-[ ]**Step 3: Live smoke (careful - real GitHub)**
811
811
812
812
```bash
813
-
bun apps/axctl/src/cli/index.ts profile publish --if-stale=6# no state -> silent no-op, exit 0
813
+
bun apps/axctl/src/cli/index.ts profile publish --if-stale=2# no state -> silent no-op, exit 0
814
814
bun apps/axctl/src/cli/index.ts profile unpublish # "not published" message
815
815
```
816
816
Do NOT run a real first publish in CI/implementation - that creates a real gist + PR. The consent prompt path is verified by the y/N abort: run `echo n | bun apps/axctl/src/cli/index.ts profile publish` and expect "Aborted".
@@ -840,7 +840,7 @@ cd __AX_DIR__ && bun src/cli/index.ts ingest --since=1 >>__LOG_DIR__/watcher.log
840
840
to:
841
841
842
842
```
843
-
cd __AX_DIR__ && bun src/cli/index.ts ingest --since=1 >>__LOG_DIR__/watcher.log 2>&1; bun src/cli/index.ts profile publish --if-stale=6 >>__LOG_DIR__/watcher.log 2>&1 || true
843
+
cd __AX_DIR__ && bun src/cli/index.ts ingest --since=1 >>__LOG_DIR__/watcher.log 2>&1; bun src/cli/index.ts profile publish --if-stale=2 >>__LOG_DIR__/watcher.log 2>&1 || true
844
844
```
845
845
846
846
(`;` not `&&` - a failed ingest must not block the freshness check; `|| true` keeps launchd happy. The publish step is a silent no-op until the user has consented once - no state file, no publish, no prompt.)
@@ -856,7 +856,7 @@ Expected: `OK`.
856
856
857
857
```bash
858
858
git add scripts/com.necmttn.ax-watch.plist
859
-
git commit -m "feat(watcher): keep published profile fresh (publish --if-stale=6)"
859
+
git commit -m "feat(watcher): keep published profile fresh (publish --if-stale=2)"
860
860
```
861
861
862
862
---
@@ -885,7 +885,7 @@ profile (ProfileV1: stats + rig + taste patterns) from the graph.
885
885
publish to a public gist (create once, PATCH in place). First run: consent
886
886
prompt showing the exact JSON, then fork + community/users/<login>.json
887
887
registration PR into Necmttn/ax (git-data API, no local clone). Watcher runs
888
-
`--if-stale=6` after ingest - silent no-op until first consent.
888
+
`--if-stale=2` after ingest - silent no-op until first consent.
889
889
`ax profile unpublish` - delete gist + local state.
0 commit comments